You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a heads up, I'm interested in being able to define per-image what the sizes should be in the template rather than in kirby's options, and also whether or not to crop them. I may end up trying this myself, although I'm new to kirby and php so it's taking me a little longer to grok how to modify this plugin.
Was curious what you think about one design decision pertaining to that. Would it be better to crop the images upon file upload, before they even hit the plugin? This seems more logical, but maybe harder to do because all the machinery is already in place to crop with the plugin per-image if you're already defining the sizes per-image.
Thanks!
Edit: clarifying, I want to be able to define the width and the height of the source images that are created and defined (e.g. 480w), not the sizes attribute
The text was updated successfully, but these errors were encountered:
Hi @joshkpeterson thanks for your suggestion. While I like the idea of having control over the generated sizes on a per-image basis, I worry that this might become a very convoluted syntax.
How would you express the default sizes for example in markdown?
I came up with a different solution. My use-case is I made a brochureware site for a business where I wanted them to be able to swap out text and image content, but not really add new pieces of content. And the client isn't creating new blog posts, or really writing markdown for anything.
I ended up just doing this:
For each image, make a Selector plugin field
Use srcset (include picturefill for IE)
Use kirby's crop() for each source. Kirby crops at runtime, but these images are saved in the thumbnails folder so in practice in production, they should already be created for 99% of users.
Hi there,
Just a heads up, I'm interested in being able to define per-image what the sizes should be in the template rather than in kirby's options, and also whether or not to crop them. I may end up trying this myself, although I'm new to kirby and php so it's taking me a little longer to grok how to modify this plugin.
Was curious what you think about one design decision pertaining to that. Would it be better to crop the images upon file upload, before they even hit the plugin? This seems more logical, but maybe harder to do because all the machinery is already in place to crop with the plugin per-image if you're already defining the sizes per-image.
Thanks!
Edit: clarifying, I want to be able to define the width and the height of the source images that are created and defined (e.g. 480w), not the sizes attribute
The text was updated successfully, but these errors were encountered: