If an image is added using the wysiwyg browser, within media_wysiwyg_filter.inc , the output is wrapped in a div with class 'media-element-container'.

An image however has display:inline-block. A div has display:block. This makes it impossible to display a line of images next to eachother, amongst others. It will look fine in the wysiwyg editor, and break in the webpage output.

When upgrading from media 1.x to 2.x, this has quite a bit of impact on existing content.

It is not possible to assign css to containing div for images only, because the file type is not specified on the containing div (the display type is).

The file entity also adds divs in the display, which is another issue and can be circumvented. But the final div from media_wysiwyg_filter.inc is a bit of a bummer.

Comments

commonpike created an issue. See original summary.

commonpike’s picture

Issue summary: View changes
joseph.olstad’s picture

Category: Bug report » Support request
Status: Active » Needs review

for 1.x compatibility you will probably want to change your rendering to legacy rendering
/admin/config/media/browser
there is a checkbox for ' Legacy rendering (using field attach)'

This should fix your issue with content created in 1.x

joseph.olstad’s picture

Status: Needs review » Postponed (maintainer needs more info)
Chris Matthews’s picture

Version: 7.x-2.8 » 7.x-2.x-dev
Status: Postponed (maintainer needs more info) » Closed (outdated)

Recent versions of media have resolved most of peoples concerns and is compatible with entity translation, multilingual and various advanced configurations. Due to the high volume of inactive and most often irrelevant issues we are Closing this as (outdated). If for whatever reason this issue is important to you AND you still have issues after checking the media recipe documentation, then let us know and we will review your concerns.

Otherwise, see the recipe documentation for how to configure media and for troubleshooting tips OR refer to the media_dev distribution if you want to see a working media setup.

As mentioned, feel free to make some noise in this issue if you still feel it is important to you or someone else.

Thanks,

Media team