FeatureFuel
1

Atomic Image widget lacks support for the sizes HTML attribute

Source: elementor/elementor#36191 · opened by @flowrange
Description Hi, I'm adding support for responsive images on some random website. This involves setting a few attributes on img tags. First one is srcset, which tells the browser all the available image resolutions. The other is the sizes attribute, which hints how an image behaves at specific screen sizes. I won't go into further details as this is well documented (see WordPress official [Reponsive Images page]( As I have a few well-defined layouts where my images sit, I wanted to centralize those 2 attributes creation. WordPress offers 2 filters for this : wp_calculate_image_srcset & wp_calculate_image_sizes. Unfortunately, the new atomic image widget only support the first filter, wp_calculate_image_srcset. I need to manually add the size attribute in the widget settings section on each instance. This is not only tedious, but as the website's general look & feel is subject to change, I can't guarantee that I won't have to change this size attrib…

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests