Hi,
I've been using this module for a while, and only today realised that the "Thumbnail" formatter allows you to set any pre-created image style for that media field.
I had been using "Rendered Entity" as I presumed "Thumbnail" would naturally use the "Thumbnail" image style that comes with core. What this has meant on a recent build was that I had to create a media view mode for each image style I needed - about 15 of them, then an image style to match the view mode name.
Then I'd choose "Rendered Entity" as the formatter, select "Card" (for example) as the view mode, then in the media_image bundle that I created, set the formatter on the "Card" view mode to "Image" and image style of "Card".
I think if we renamed the "Thumbnail" formatter name to something more generic, like "Image Style" it would make more sense.
I'll attach a small patch for this.
Comment | File | Size | Author |
---|---|---|---|
#3 | change-formatter-name-image-style_2844028_3.patch | 558 bytes | markconroy |
| |||
Screen Shot 2017-01-16 at 20.47.47.png | 18.98 KB | markconroy |
Comments
Comment #2
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedPull Request Here - https://github.com/drupal-media/media_entity/pull/82
Comment #3
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedJust adding a patch here so I can apply it via composer in our project.
Comment #4
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedComment #5
keesje CreditAttribution: keesje as a volunteer commentedProblem is that the "thumbnail" formatter is not designed for usage in a content scope: it does not update when a media entity is updated. And, it is not only for images, it's a formatter for every media entity type imaginable (documents, video, etc.).
For a solution for images please look at https://www.drupal.org/node/2850169.
Comment #6
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedThanks @keesje,
That seems like a strange design decision. I'll go back to using 'Rendered entity' as my formatter so. Thankfully the present project it not a very big one, so I should have all my image fields sorted in a few hours.
I'll close this issue.
Comment #7
keesje CreditAttribution: keesje as a volunteer commentedIf you would give https://www.drupal.org/node/2850169 a look and give your opinion? Could be an easier solution.