Such a canonical attribute would solve different problems we currently have with the web platform:
- Authors currently refrain from using more efficient image formats like WebP due to interop problems when people share or download these images: If the addressee does not have a WebP capable client, she/he cannot open the image. Same goes for software like Photoshop. With the canonical attribute, the image downloaded would not be the one currently being displayed but the one specified in the attribute:
<img src=“example.webp” canonical=“example.jpg”>
The attribute would help in a similar way for when srcset or a picture element are active and the browser displays a slimmed down version out of the set. Again, when sharing or saving, the canonical attribute would ensure that the unoptimized image would be used for that.