When an image is uploaded via the WYSIWYG integration it is stored like this:

[[{"type":"media","view_mode":"media_large","fid":"50151","attributes":{"alt":"","class":"media-image","height":"108","typeof":"foaf:Image","width":"480"}}]]

For some reason that turns into the following in the WYSIWYG editor.

<span id="styles-1-0" class="media-image media-element file-media-large" data-file_info="%7B%22type%22:%22media%22,%22view_mode%22:%22media_large%22,%22fid%22:%2250151%22%7D"> <img id="1" src="http://example.com/files/styles/medium/public/something.png" alt="" /></span>

Note that the image style on the nested img tag is "medium" and not "large" as is currently configured on the site.

Comments

DamienMcKenna’s picture

Clarification: the 'large' file display uses the 'large' image style while the 'default' file display uses the 'medium' image style.

gmclelland’s picture

See #2048389: InsertMedia does not work in CKEditor when inserting it within existing paragraph. for a similar problem

It looks like your media tags are getting messed up by the wysiwyg editor which is causing the incorrect markup to output.

I would try using TinyMCE 3.5.8 with wysiwyg module and see if that helps. I had problems when using ckeditor.

Chris Matthews’s picture

Component: WYSIWYG integration » Code
Issue summary: View changes
Status: Active » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team