Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The current media styles feature provides some "Grid friendly" styles. This is great however it is making the assumption about what grid is being used. Would it be an idea to rethink what defaults are provided and generalize the styles a little bit more ?
Comments
Comment #1
MiSc CreditAttribution: MiSc commentedAgree.
Comment #2
fabsor CreditAttribution: fabsor commentedYes, I agree. The media styles that are in place now are basicly created for the newspaper products and they are based on the assumption that the precision grid is used.
One cool thing we could do is that we could add a "hook" for our theme where the theme can declare it's grid sizes. We could then use the definition from the grid to provide the image styles, which is provided by hook_default_image_styles. If we do this, we could basicly generate the appropriate image styles for each grid as long as the theme declare how it should work.
Comment #3
BJ___ CreditAttribution: BJ___ commentedI'm actually building a module that does this very thing (among other things). I have been working on it for a while it's about 60% done. Hopefully it will be done soon
Comment #4
fabsor CreditAttribution: fabsor commentedThen I suggest we add that module once it's done and use it as a generic solution.