Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Could you please check now:
=> hidden link
Our Dev has added the fix the issue and altered the file at the following path:
vendor/toolset/types/embedded/views/image.php
Very close! The correct image is now being displayed, but there are no srcset or sizes attributes for responsive images. How can these be added?
Thanks.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Well - here is the Doc that may help you:
=> https://toolset.com/documentation/user-guides/creating-responsive-designs/
With images you can set attribute size - following link will guide you with all available attributes with image field:
=> https://toolset.com/documentation/customizing-sites-using-php/functions/#image
If you are not using Bootstrap, then you need to adjust your image width to 100%, something like following reply:
=> https://toolset.com/forums/topic/images-added-via-toolset-types-are-not-responsive/#post-559846
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)
Ok - please close this ticket as the original issue with this ticket was a directory structure that is resolved.
I'm handling the new srcset related issue with new ticket here:
=> https://toolset.com/forums/topic/split-size-attribute-not-working-in-types-image-shortcode/
OK. One more related question: Will the changes to fix the directory structure issue be included in the next release of Types?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
I see the fix is set to be published with Types version 3.1.