Fix max-width img for files not lazy loading

What does this MR do and why?

This MR fixes an issue (identified by this HN comment) with image widths in non-markdown files. Here's an example on .com.

Screenshots or screen recordings

Before After After (markdown still works)
Screenshot_from_2022-01-21_11-53-36 Screenshot_from_2022-01-21_11-57-39 Screenshot_from_2022-01-21_11-57-16

How to set up and validate locally

  1. Upload a large image to a project repo

  2. Create a .org file referencing with content like:

    ** The image
    
    [[file:path/to/wide_image.jpg]]
    
  3. Open the newly created .org file. The image should be rendered but constrained to the file container.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Paul Slaughter

Merge request reports

Loading