[wp-trac] [WordPress Trac] #34736: wp_calculate_image_srcset filter: provide the individual srcset image size
WordPress Trac
noreply at wordpress.org
Thu Nov 19 03:16:05 UTC 2015
#34736: wp_calculate_image_srcset filter: provide the individual srcset image size
--------------------------+-----------------------------
Reporter: kraftbj | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When using the `wp_calculate_image_srcset` filter, plugins have access to
the `value` (typically the width), but no easy way to access the height of
the image being used for that particular srcset source.
Since Core already knows the height of the image being considered, instead
of asking a plugin to backwards-engineer it when needed, I suggest we
should be explicitly sending the size to make it more functional.
Slack convo: https://wordpress.slack.com/archives/feature-
respimg/p1447899460000167
Plugin example: https://github.com/Automattic/jetpack/pull/3040
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34736>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list