Restrict user-inserted images to the width of their container element to avoid overflow

Description

Steps to reproduce

  1. Log in

  2. Post > New Work

  3. Fill in required fields, and in your work text, include a rather large image

  4. Post

  5. On a screen that is not as big as your image, view the work

What happens

The image is too wide to fit on the screen. It scrolls sideways. Meh.

What should happen instead

The image should have a maximum width of 100% of the container size. (Note that the container isn't the same width as the screen.

Notes

This needs an announcement first, which is in progress.

Testing notes

Test on images that have width and height attributes set, just width, and just height.

This will apply to any user- (or admin-) inserted images, so it wouldn't hurt to test large images in comments or admin posts as well.

Environment

None

Status

Assignee

Sarken

Reporter

Sarken

Roadmap

Works

Priority

Medium

Affects versions

Fix versions

None

Components

FrontEnd

Difficulty

Easy

Required Access Level

None

Milestone

Internal 0.9
Configure