Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Overriding naturalWidth / naturalHeight will break some existing tools #10

@andydavies

Description

@andydavies

A number of tools [1][2][3] rely on naturalHeight and naturalWidth to determine whether appropriately sized images are being served to the browser.

If naturalHeight and naturalWidth are updated to reflect the dimensions specified in intrinsicSize then the ability to get the original image dimensions will be lost and features of these tools will break.

  1. Cloudinary's image analysis - https://webspeedtest.cloudinary.com/results/180920_13_25f8ec2b83dfd646663237df6e5a9e9e
  2. NCC Group's Image Checker Chrome plugin - https://chrome.google.com/webstore/detail/ncc-image-checker/fphiheficgnpphmjdliclanppccfgifl?hl=en-GB
  3. Google Lighthouse - https://github.com/GoogleChrome/lighthouse

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions