declared-size.mismatch
Declared image size does not match the image. Level: Warning.
When it is raised
Raised when the card image loaded, og:image:width and og:image:height are usable numbers, and either differs from the measured image by more than 1 px. The image measured is the card image as resolved from og:image, then og:image:url, twitter:image and twitter:image:src, so on a page with neither og:image nor og:image:url, the declared og:image size is compared with the twitter:image (or twitter:image:src) file. It needs a measured size, so it does not run when the image could not be measured (formats other than PNG, GIF, JPEG and WebP, or a file whose header could not be read). JPEGs with an EXIF orientation of 5 to 8 are measured as displayed, with width and height swapped.
What it does to a shared link
The declared width or height differs from the image file's by more than 1 px. The message gives both sizes, declared first.
How to fix it
- Set og:image:width and og:image:height to the image file's dimensions, which the message shows second.
- If the image was replaced or resized, update both tags in the same change as the image URL.
- For a rotated JPEG, declare the width and height as the image appears when displayed.