No, that's not what I'm after. I mean the html img element attributes srcset and sizes. This is nothing css related.
For example:
<img src="hidden link " srcset="hidden link 150w, hidden link 300w" sizes="100vw" />
Also see the attached screenshot. The img element without srcset and sizes is the one generated by the types shortcode.
Wordpress has been able to automatically generate this markup since version 4.4: https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/
How is it possible to automatically generate this markup with the types shortcode, without doing it manually by using multiple types shortcodes to output the different image size urls?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
So, on this page: hidden link
- do you mean that the second image has correct result with srcset attribute BUT the issue with the first image which is displayed using shortcode:
This does not work:
[types field='image' title='%%TITLE%%' alt='%%ALT%%' size='thumbnail'][/types]
And this works:
new==[types field='image' title='%%TITLE%%' alt='%%ALT%%' size='custom' width='150' height='150' resize='proportional'][/types]
Correct?
Sorry, those other images were causing too much confusion. Please visit the page again.
The first image is displayed with the types shortcode. It does not create html markup that includes srcset or sizes.
The second image is inserted using the Add Media button. It does include the srcset and sizes markup.
How can these markup be automatically included with the Types shortcode?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
I just found a internal Dev ticket to add this feature and this feature is set to added with Types version 3.2.
Please note that there is no ETA on it.