admin管理员组文章数量:1394392
Gallery block are very useful to layout thumbnails. However, when I choose a columns layout (for example, four columns layout), the srcset for this thumbnail remains the same as a large image.
In other words, with a four columns layout, the thumbnails srcset come with:
sizes="(max-width: 768px) 100vw, 768px"
So, all thumbnails are built with the large images. For example, in this page: /
Is it possible to get something like this?:
sizes="(max-width: 768px) 100vw, 200px"
Further more, is it possible to set srcset up regarding the number of columns in the gallery block layout?
Gallery block are very useful to layout thumbnails. However, when I choose a columns layout (for example, four columns layout), the srcset for this thumbnail remains the same as a large image.
In other words, with a four columns layout, the thumbnails srcset come with:
sizes="(max-width: 768px) 100vw, 768px"
So, all thumbnails are built with the large images. For example, in this page: https://stage.margenesdelarte/productions/relato-de-salida-al-albergue-2018/
Is it possible to get something like this?:
sizes="(max-width: 768px) 100vw, 200px"
Further more, is it possible to set srcset up regarding the number of columns in the gallery block layout?
Share Improve this question asked Feb 19, 2019 at 17:13 aitoraitor 7252 gold badges8 silver badges23 bronze badges1 Answer
Reset to default 0Unfortunately, setting the sizes based on the viewpoint size in the Gallery Block isn't possible as of this writing (quite frustrating, imho) :/
There's a couple outstanding tickets about this, notably: https://github/WordPress/gutenberg/issues/9620 and https://github/WordPress/gutenberg/issues/13842
本文标签: srcset attribute in Gutenberg gallery blocks
版权声明:本文标题:srcset attribute in Gutenberg gallery blocks 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744642182a2617189.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论