You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Tachyon Plugin builds the srcset attribute by replacing the sources WP core builds with Tachyon URLs. If the inserted image's aspect ratio doesn't match the ratio of any of the core image sizes (small, medium, etc) or an image size added by add_image_size() then the srcset is empty.
As Tachyon can recreate the source crop at any size up to that of the original image, a series of sensible defaults can be used to generate the srcset. These sensible defaults can be based on common device screen resolutions.
There are a few conditions in the core function wp_calculate_image_srcset() that we'd need to ensure we pass by applying a custom filter to wp_calculate_image_srcset_meta.
Currently the Tachyon Plugin builds the
srcset
attribute by replacing the sources WP core builds with Tachyon URLs. If the inserted image's aspect ratio doesn't match the ratio of any of the core image sizes (small, medium, etc) or an image size added byadd_image_size()
then thesrcset
is empty.As Tachyon can recreate the source crop at any size up to that of the original image, a series of sensible defaults can be used to generate the
srcset
. These sensible defaults can be based on common device screen resolutions.There are a few conditions in the core function
wp_calculate_image_srcset()
that we'd need to ensure we pass by applying a custom filter towp_calculate_image_srcset_meta
.https://github.com/WordPress/wordpress-develop/blob/fd5ba80c5c3d9cf62348567073945e246285fbca/src/wp-includes/media.php#L1046-L1219
The text was updated successfully, but these errors were encountered: