WP 4.4 Responsive Images (srcset/sizes) in Text Widget
-
I’m slowly wrapping my head around the new responsive images features in WP 4.4. I’ve got it fairly well figured out now for our CPTs & default page/post content images.
– But is there a way to have the new WP srcset & sizes attributes added to an image placed in a standard Text widget??
We could hard-code all of the extra data in the widget, but that would just be unwieldy to deal with and/or make updates to (there will be quite a few of them). Hoping there is a function or something that could replace a standard
<img src="full-size-original.jpg">
with all of the srcset & sizes attributes as happens with images placed in content editor.And ideally it might be nice to know how to modify the sizes attribute if needed. We were able to find something for post thumbnails, but not sure it would work here.
THANKS!
- The topic ‘WP 4.4 Responsive Images (srcset/sizes) in Text Widget’ is closed to new replies.