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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markconroy created an issue. See original summary.

markconroy’s picture

markconroy’s picture

Just adding a patch here so I can apply it via composer in our project.

markconroy’s picture

Status: Active » Needs review
keesje’s picture

Problem 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.

markconroy’s picture

Status: Needs review » Closed (works as designed)

Thanks @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.

keesje’s picture

If you would give https://www.drupal.org/node/2850169 a look and give your opinion? Could be an easier solution.