[wp-trac] [WordPress Trac] #36982: Add image attributes and additional context to the wp_calculate_image_srcset and wp_calculate_image_sizes filters
WordPress Trac
noreply at wordpress.org
Tue May 31 17:39:57 UTC 2016
#36982: Add image attributes and additional context to the
wp_calculate_image_srcset and wp_calculate_image_sizes filters
-------------------------+-----------------------------
Reporter: kylereicks | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Keywords:
Focuses: template |
-------------------------+-----------------------------
Because the srcset and sizes attributes try to give the browser guidance
on how CSS is going to handle images, we should be able to take into
account image class attributes (and other attributes that could be used as
CSS selectors) when using the {{{wp_calculate_image_srcset}}} and
{{{wp_calculate_image_sizes}}} filters to set the appropriate srcset and
sizes.
It would also be helpful to be able to supply a context to functions like
{{{wp_image_add_srcset_and_sizes}}} and
{{{wp_make_content_images_responsive}}} so we can calculate different
srcset and sizes attributes if a medium sized image is in the main content
section vs. in an aside or other section.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36982>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list