Improve the og:image attributes

The ideal image size for og:image is 1200x630px.

Reading the og:image tag values from _seoMetaTags you get an image with a fixed width of 1000px - This should be 1200px. It might also be worth to consider an option on the block, that crops the image at 630px in height. But getting the width optimized would be a start.

The og:image:width and og:image:height also use the original image sizes. They should be the actual sizes of the og:image. It might be okay if it just uses it for the aspect ratio, since that would still be correct if you just set the width.

Use og:image:width and og:image:height Open Graph tags: Using these tags will specify the image dimensions to the crawler so that it can render the image immediately without having to asynchronously download and process it.

          {
            "attributes": {
              "property": "og:image",
              "content": "https://www.datocms-assets.com/47743/1585207275-image-33-copyright.jpg?fit=max&fm=jpg&w=1000"
            }
          },
          {
            "attributes": {
              "property": "og:image:width",
              "content": "1920"
            }
          },
          {
            "attributes": {
              "property": "og:image:height",
              "content": "1080"
            }
          },

thank you! I’ve turned this in a feature request

@mat_jack1 Matteo, any update on this?

The query still return this:

        {
          "attributes": {
            "name": "twitter:image",
            "content": "https://www.datocms-assets.com/18597/1634124776-house-of-education-sharing.png?fit=max&fm=jpg&w=1000"
          }

hello @sebastian we are waiting to see a bit more interest in this feature request before implementing it. We have limited resources, so we want to focus on what’s more important to our users, hope you understand!

Thanks for your reply @mat_jack1 - much appreciated.
Changing the hardcoded defaults from ?w=1000&fit=max&fm=jpg to ?w=1200&fit=max&fm=jpg would already drastically improve the situation.

As PRs go, it doesn’t get much smaller than that :wink: