-
AuthorPosts
-
February 18, 2026 at 6:44 pm #1495198
Hi,
I’m experiencing an issue where some images on my client’s website are not being replaced with their optimized versions generated by the Smush Pro plugin. Other images appear to be optimizing correctly, but a subset of them continue to serve the original, unoptimized files.
I believe this may be related to how Enfold handles images. I tried to deactivate all plugins except Woocommerce and Smush Pro to see if any other plugins might be the cause of this issue, but it doesn’t seem like it. There are missing srcsets as well, which leads me to believe the theme isn’t using the regular wp_get_attachment_image() function (loading images the WordPress way), which then doesn’t let WordPress apply image optimizations and other hooks that come from that function.
Could you advise on whether Enfold has any known conflicts with Smush Pro, or if there’s a recommended way to ensure all theme-rendered images are picked up by the plugin?
In the example link, you can look at image HTML. The first section’s image has been manually replaced with AVIF while the second and third section’s image still load PNGs. None of the images have responsive srcsets.
We look forward to your response,
NevenFebruary 19, 2026 at 3:38 pm #1495236Hey Citvej,
Thank you for the inquiry.
Where did you set the option to convert the images to AVIF?
The srcset should be automatically added to the images as long as Enfold > Performance > Responsive Images is enabled, which enables the default WordPress srcset feature. It’s possible that one of the plugins installed on the site is interfering with the default WordPress functionality.
Best regards,
IsmaelFebruary 20, 2026 at 3:51 pm #1495292Hi Ismael.
Thanks for getting back to me. We are using Smush, which optimizes images in bulk. What we’re more interested in, besides srcset, is that we get the optimized avif image. This means that the theme should leverage WordPress’ wp_get_attachment_image function, which I see it does.After examining avia-shortcodes/image/image.php I noticed that in some cases the image gets built in a custom way based off the following condition (is_numeric($src_original)).
Could you expand what are some practical cases when this happens?Code screenshot: https://snipboard.io/r5YBgQ.jpg
Thanks,
NevenFebruary 24, 2026 at 6:03 am #1495407Hi,
Thank you for the update.
This specific condition is for images that are retrieved only using their ID but still use wp_get_attachment_image() for retrieval — such as element shortcodes. We recommend reaching out to the plugin developers regarding this issue, as we cannot reproduce it on our end. Image elements contain srcset attributes when we tested them in our installation.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.
