Image size warnings
-
I am getting warnings that image size is too small, and that they should be 1200px. This is crazy because
- The pages layout would look wrong
- In most cases I don’t have images that a that size anyway even if I could replace them all.
- If the images were that large, page speeds would be a lot lower
Can anyone please help, this makes no sense at all.
Thanks
-
This topic was modified 1 year, 6 months ago by
voodoochill.
-
This topic was modified 1 year, 6 months ago by
voodoochill.
-
Hello @voodoochill
It’s warning so you can ignore it, It is recommended to use at least one image with 1200px width, the cover images are best suited for this kind of images.
Ref : https://developers.google.com/search/docs/data-types/article#amp
If it adding large image mess with your site layout add a default image only in Structured data.
If you are using any SEO plugin check if you can add default images for all posts with filters for example Yoast SEO provide wpseo_schema_article filter.
the cover images are best suited for this kind of images.
Sorry I do not understand what are cover images.
I have Yoast, but cannot make head or tail of that link, is there as impler explanation for non developers anywhere please.
I cannot find in the Yoast plugin interface where to add an image
Sorry if I’m being a bit thick
Hello @voodoochill,
Sorry I do not understand what are cover images.
You can add a cover image for a blog post with Cover Block as shown here in the screenshot
Or you can choose a featured image as shown in this screenshot.
Let me explain how you can use wpseo_schema_article
first, upload a generic image that represents your site
goto Dashboard -> Media-> Add New
Now open the image and check copy it’s ID as shown in this screenshotUse the copied ID and replace the below code with 1234, now copy the whole code add it in your themes functions.php or in custom plguin.
add_filter( 'wpseo_schema_article', 'example_change_article' ); add_filter( 'wpseo_schema_webpage', 'example_change_article' ); /** * Adds images to Article Schema data. * * @param array $data Schema.org Article data array. * * @return array Schema.org Article data array. */ function example_change_article( $data ) { // This is the attachment ID for our image. $attachment_id = 1234; // We're going to create a graph piece for our image. Every graph piece always needs a Schema ID, so it can // be referenced by other graph pieces, best practice is to base that on the canonical adding an ID that's // always going to be unique. $schema_id = YoastSEO()->meta->for_current_page()->canonical . '#/schema/image/' . $attachment_id; $data['image'] = YoastSEO()->helpers->schema->image->generate_from_attachment_id( $schema_id, $attachment_id ); return $data; }
This will code will add an default image in structured data for every post.
I will also recommend contacting Yoast SEO support as the sturctured data is generate from Yost SEO plugin.
-
This reply was modified 1 year, 6 months ago by
Milind More.
OK thanks, I’m beginning to understand I think.
For same strange reason Google wants a webpage to have an image of at least 1200px x 1200px (in spite of the fact it also wants pages to load quickly!)
On my site it makes no sense to have such a large image (the pages themselves are only 800px wide)
I cannot use cover images on this site yet as (for various reasons) I still need to use classic editor
BUT:
Or you can choose a featured image as shown in this screenshot.
Are you saying I can make all my featured images 1200 x 1200. I can maybe do that as I do not display them on the article, they are only ever used as thumbnails.
It seems a bit silly to use such a large image for a thumbnail, but who am I to argue with Google?
So I will try that.
For the pages without featured images I am still a bit confused. Am I correct in saying that the default image in structured data will only apply when there is no actual feature posts specified?
Are you saying I can make all my featured images 1200 x 1200. I can maybe do that as I do not display them on the article, they are only ever used as thumbnails.
Yes, but please check with your SEO plugin support to make sure those are included in the schema
It seems a bit silly to use such a large image for a thumbnail, but who am I to argue with Google?
Images will be used for displaying Google Search result cards as shown in this screenshot.
For the pages without featured images I am still a bit confused. Am I correct in saying that the default image in structured data will only apply when there is no actual feature posts specified?
No, the code snippet I provided will add default images to all the Posts and Pages despite having featured images. I will recommend contacting Yoast SEO support regarding the same as I can not advise you further as your site is using their plugin to generate structured data.
OK, thanks I will contact Yoast about this.
One thing confuses me about AMP images in general.
The GSC page you linked to above
https://developers.google.com/search/docs/data-types/article#amp
says
Only a marked-up image that directly belongs to the article should be specified.
Images should be at least 1200 pixels wide.So I don’t understand how a default image that shows on all pages fits the criteria of directly belonging to an article.
Are you able to clarify that, thanks.
-
This reply was modified 1 year, 6 months ago by
voodoochill.
So I don’t understand how a default image that shows on all pages fits the criteria of directly belonging to an article.
Yes this is correct we are just hacking our way to add image I think Yoast People will be best to advise you for SEO related stuff
I will mark this topic as resolved, As your issue is not related to the AMP plugin. Feel free to open a new support topic if you require any further assistance.
Yes this is correct we are just hacking our way to add image I think Yoast People will be best to advise you for SEO related stuff
In a way it is related in that I am trying to lose the warnings. If your hack does this then yes I am happy to have this marked as resolved. I believe it may take some time for Google Search Console to catch up with the changes so difficult for me to tell if your hack (thank you) has worked yet.
I know they are only warnings not errors, but maybe I’m a bit OCD and it helps me to know all is well when I see a “clean sheet”
I do vaguely remember seeing a plugin that added a default featured image, only when there wasn’t one specified. I wish I could remember what it was/.
Thanks again for your help.
-
This reply was modified 1 year, 6 months ago by
- The topic ‘Image size warnings’ is closed to new replies.