Playing around with the media module and discovered a strange thing.

First I embedded an image using the CKEditor media browser as well as scaled it down a bit in the editor.

Later, as I was playing with adding the Multimedia asset field to the image type managed by media, I added the same image using the field type media to the same node.

The result is that that both images are then displayed in the same size, the size from the embedded image. If I edit the node and change the size of the embedded, then that will change the size of both when viewed to the new embedded size.

How to recreate:

- Add the multimedia browser to the WYSIWYG editor.
- Add a Multimedia asset field to the content type.
- Embed an image in the editor
- Select the same image for the Multimedia asset field
- Scale the embedded image and the other will change its view size as well.

This only happens when the same image are used in both places. Different images are viewed different.

Comments

JacobSingh’s picture

Status: Active » Closed (cannot reproduce)

I think this is now resolved. At least with styles 2.x can you try that and re-open if still a problem?

tsvenson’s picture

Status: Closed (cannot reproduce) » Closed (fixed)

Confirmed, its fixed using the latest devs of Media and Styles.

tsvenson’s picture

Status: Closed (fixed) » Active

Hm, have to reopen this issue since the problem is still there to some degree.

When saving a node the embedded and attached images (same image) correctly have different sizes, but when clearing the cache the attached image is getting the same size as the embedded.

So, the problem is sort of half solved...

JacobSingh’s picture

Title: Same image embedded and attached views in the same size » After a cache clear, same image embedded and attached views in the same size for one page load
Priority: Normal » Major

Yeah, I see it too...

Ugh. It only lasts one page load after a cache clear... I'm guessing it is because the file which is inline gets cached, and because it is generated first, it caches the rendering for the entity.

After that happens, the other one gets affected. On the next page load, the content filter cache is done, and the entity works properly.

I don't know how we detect the case here and not disable caches where they shouldn't be.

JacobSingh’s picture

Dave Reid’s picture

Status: Active » Closed (duplicate)

Marking this as a duplicate of a new #1984424: RFC: Disable caching for media filter