Conversation
|
@MrTango thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
affa538 to
4e707b9
Compare
|
@jenkins-plone-org please run jobs |
4e707b9 to
6e5cd31
Compare
There was a problem hiding this comment.
The only thing I see here is that if I request to create the picture tag without requesting any picture_variant but I request an explicit sizes, the generated img tag lacks the srcset and returns the original image in its src.
I understand not requesting any picture_variant and passing an explicit sizes as a way to render the full picture tag with the source with its srcset but passing a custom sizes instead of relying on predefined picture variants, which gives the template developer full control over the rendered HTML code.
This is what I wanted to achieve also in #170 but rendering a single img instead of a full picture.
|
Moreover, I have a question: If after these changes we are just rendering one This way the code is much simpler and also is the configuration of picture variants. |
|
The idea is, that the picture variants are defines, as they needed by a designer/integrator or Developer. Calling the picture method without a picture variant does not make sense in my world. Maybe let's have a short call these days on discord. |
|
I'll give a talk about the picture variants at the German Plone-Tagung and will probably also hold again in English, maybe at PloneConf if i can make it. |
I see your point, but that requires developers to predefine the picture variants in the controlpanel, while, as I see, just calling the method and passing the required Anyway, we can talk durinng the Beethoven sprint also :) |
|
I have not really looked at this and the related PRs, and it has been a while since I dove in the whole responsive images area. But having a Have people talked meanwhile to discuss this online or on a sprint? Are the PRs still up to date, now that PR #170 was merged? |
|
I think that these changes are useful. In #170 I created a new method in the |
|
Yes that's all still valid, i have to get back to it after Plone-Tagung is now over ;). |
also: allow to set lazy to false, to suppress the loading="lazy" attribute
this needs to be merged together:
plone/plone.outputfilters#86
plone/plone.base#80