- Issue created by @m-p-j
For media you can allow the user to change the view mode in the editor.
But resizing an image overrides this setting to one of the view modes assigned by width of the image.
So if you want to apply a specific image style through a view mode, it does not get applied.
Check the data-view-mode attribute before setting it in the filter.
Maybe recommend the use of the combined_image_style module and if it's installed, combine the styles from the two view modes.
This will likely require some altering when the media is rendered.
Active
1.0
Code