If a matched attribute has more than one image, such as srcset, and one or more images are not comma and space separated the $sizes array in Cache_Enabler_Disk::_covert_webp_srcset will result in an array item having more than one image:
The extensions are still replaced or appended, however, only the first image is checked to see if it exists. In the example above that would mean only https://www.example.com/wp-content/uploads/test-300x169.webp is being checked, if it exists then the entire string is returned converted. In this case it means not all images are being checked to see if they exist, which could result in an image path being converted even if the WebP version doesn't exist.
If a matched attribute has more than one image, such as
srcset
, and one or more images are not comma and space separated the$sizes
array inCache_Enabler_Disk::_covert_webp_srcset
will result in an array item having more than one image:The extensions are still replaced or appended, however, only the first image is checked to see if it exists. In the example above that would mean only
https://www.example.com/wp-content/uploads/test-300x169.webp
is being checked, if it exists then the entire string is returned converted. In this case it means not all images are being checked to see if they exist, which could result in an image path being converted even if the WebP version doesn't exist.