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
I'm trying to set the Wordpress image srcset max-width to 2048 (for retina, which is 2x my $content_width of 1024) using the function below, but I always end up getting the full-size image on high-res displays anyway (i.e., sizes="(max-width: 3712px) 100vw, 3712px"). Wordpress appears to globally limit that to 1600 in media.php, so I'm not sure why I would ever be getting the full-size of images greater than 1600. Is there something in Independent Publisher that would be overriding these settings?
/* Set new max srcset width */
add_filter('max_srcset_image_width', function($max_srcset_image_width, $size_array){
return 2048;
}, 10, 2);
The text was updated successfully, but these errors were encountered:
I'm trying to set the Wordpress image srcset max-width to 2048 (for retina, which is 2x my $content_width of 1024) using the function below, but I always end up getting the full-size image on high-res displays anyway (i.e.,
sizes="(max-width: 3712px) 100vw, 3712px"
). Wordpress appears to globally limit that to 1600 in media.php, so I'm not sure why I would ever be getting the full-size of images greater than 1600. Is there something in Independent Publisher that would be overriding these settings?The text was updated successfully, but these errors were encountered: