Skip to content

Make optimized version of original image size, never load original image. #11822

Open
@mor10

Description

Related to #6177 and #6131 and #11821 . Filed as separate issue because #6177 is getting too big.

Problem

If a user uploads an unoptimized image, maybe directly from a digital camera, that image file may end up being sent to the visitor browser causing a significant performance hit. For example, this happens when the viewport or displayed width of an image matches or exceeds the original uploaded image width as the original image is the largest image in the srcset attribute array.

Solution

  1. Always create a new optimized version of the original image matching the original dimensions of the uploaded image.
  2. Add the optimized version of the original image as the largest image file available in srcset array.
  3. Never load the original uploaded image unless explicitly requested by user.
  4. Add new option to "link to" option in images to point at optimized version of original image, and a warning/similar to the option to link to actual original image to avoid site admins loading original images into things like lightboxes.

Metadata

Assignees

No one assigned

    Labels

    [Feature] MediaAnything that impacts the experience of managing media[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions