Nothing you say is wrong, but ultimately we should share the original image at it's original size, because "og:image" can be used for many things. When you say "preview", I guess you are referring to the link preview that WhatsApp creates when you share a link ... It should really create it's own downsized version of the image for this scenario, just like all other services do. For example, when you share a link on Facebook, it will take the preview image full size (which likely remains in it's own cache), and spawns a resized version suited for the specific device, screen and sharing method.
It seems to be a WhatApp-specific issue that it doesn't want to download large images, and then resize them on it's server, likely because it considers it to be "too slow".
mvandamn wrote:Currently the `og:image` tag links to directly to the page preview image, which is full size.
But there is also the `/render/w1280` endpoint. Would it be possible to link to there instead?
Even if this would be a useful solution in your case, unfortunately, you can't modify this code, because it's built into templates that have been pre-rendered into PHP cache files.
mvandamn wrote:Recently I noticed that when sharing a page over Whatsapp, the preview image doesn't show. Some more digging revealed the image was to big.
Makes you wonder what their limit is? :thinking:
mvandamn wrote:That might be a rather lame limitation of WhatsApp, but on the other hand, its a preview, we don't need to full size.
Since we can't really provide multiple og:images, it should really be the service's responsibility to "get" the og image and then serve it at an appropriate size for the specific sharing scenario.
I think in most cases, when people upload web-size images, this shouldn't be a problem. However, if you are uploading camera-originals (5-10.000 px), this could be an issue on some platforms (eg WhatsApp).
The only workaround solution I can think of, is to upload a smaller images into the folder(s) you want to share, and set it/them as preview images.