Yireo_Webp2 icon indicating copy to clipboard operation
Yireo_Webp2 copied to clipboard

Magento Pagebuilder -> Support Mobile Images

Open duffner opened this issue 2 years ago • 2 comments

Today, this module only supports the primary image used within Magento's pagebuilder module. If an alternate Mobile Image is added, the module ignores this image, and WebP is not applied.

I believe this to be mostly a bug, as it works correctly in other situations, but a slight feature request as it doesn't appear to be supported today.

duffner avatar Dec 16 '21 21:12 duffner

I don't know about this feature and don't have the time to aim for compatibility with specific features. Instead, let's make this technical. This WebP extension is not intended to work with PageBuilder, and it works. Why? Because PageBuilder generates img tags. So it's not PageBuilder that needs to be supported, but HTML. What kind of HTML are you talking about?

jissereitsma avatar Dec 17 '21 06:12 jissereitsma

i just wanted to follow up that this is still an issue.

The issue isn't specifically with pagebuilder but the additional option for a mobile version of every image.

image

What then ends up happening is a complex path ends up getting passed into the webp converter, which correctly throws an exception because that path doesn't exist in the cache.

[2022-06-28 13:20:00] main.ERROR: Source cached image does not exists https://www.wholesalecabinets.us/media/wysiwyg/wholesale-cabinets-independence-day-sale-2022.jpg","mobile_image":"https://www.wholesalecabinets.us/media/wysiwyg/wholesale-cabinets-independence-day-sale-2022-mobile.jpg {"exception":"[object] (Yireo\NextGenImages\Exception\ConvertorException(code: 0): Source cached image does not exists https://www.wholesalecabinets.us/media/wysiwyg/wholesale-cabinets-independence-day-sale-2022.jpg\",\"mobile_image\":\"https://www.wholesalecabinets.us/media/wysiwyg/wholesale-cabinets-independence-day-sale-2022-mobile.jpg at /chroot/home/wholesal/wholesalecabinets.us/html/vendor/yireo/magento2-webp2/Convertor/Convertor.php:138)"} []

I'm thinking the best way to handle this is look for the pattern and convert them both.

tsfanning21 avatar Jun 28 '22 13:06 tsfanning21