0

I use Schema.org markup for my website to make it more understandable for search engines. I generate an image (using PHP) for each post. That image isn't a stored image with a specific URL. So it won't start with a domain name and end with something like .jpg or .png. Because it is not stored on the server.

Actually, the generated image looks like this:

<img alt='title-1' itemprop='image' src='data:image/png;base64,iVBORw0KGgoA ... EWlAAAAABJRU5ErkJggg==' />

Those ... in the middle of src's value stands for "a long string".

The problem is, Google Structured Data Testing Tool cannot understand it as an image. Any idea?

Note: We have storage limitation on the server and cannot store generated images. That's why we're trying to generate it every time using PHP.

  • 1
    Have you tried adding a charset and testing it that way? Source: stackoverflow.com/a/8499679/2297309 – Michael d May 31 at 15:47
  • Why do you need Google to understand this image? If it is a generated image it isn't likely high enough quality to be indexed in Google Image Search anyway. – Stephen Ostermiller May 31 at 18:18
  • @StephenOstermiller Please search for "معنی سلام" on google (it means "what's the meaning of hello" in Persian). You will see three images (which are indexed) the same as images I'm generating. – Shafizadeh May 31 at 18:22
  • Text on a plain background is very low quality. High quality images for image search are large photographs. In addition to being very low quality, you say your images are duplicate of something else out there. Don't even bother. – Stephen Ostermiller May 31 at 18:32
  • @StephenOstermiller They are not duplicate. They are identical pattern. That text is different for us and something else out there. – Shafizadeh Jun 1 at 8:56
1

According to the information of Webopedia:

Structured data refers to any data that resides in a fixed field within a record or file.

Google's recommendations for structured image data tell us the following:

Images

When specifying an image as a structured data property, make sure that the image actually belongs to the instance of that type. For example, if you define the image property of schema.org/NewsArticle.image, the marked-up image must directly belong to that news article. All image URLs must be crawlable and indexable. Otherwise, we will not be able to display them on the search results page.

Therefore, if you have several dynamic images for an object on your website, then these images should be linked with this object in your sitemap, as recommended by Google:

<url>
<loc>http://example.com/sample.html</loc>
<image:image>
  <image:loc>http://example.com/image.jpg</image:loc>
</image:image>
<image:image>
  <image:loc>http://example.com/photo.jpg</image:loc>
</image:image>

In addition, using dynamic images, you need to take into account the fact that these images have a high-level expenditure of scanning budget. Check the Google confirms AJAX (i.e. XHR) calls consume crawl budget:

One more thing to look at if you need to optimize your crawl budget for the most efficient Googlebot crawl of your pages. The clarification. The update (in italics added here) reads, “Generally, any URL that Googlebot crawls will count towards a site’s crawl budget. Alternate URLs, like AMP or hreflang, as well as embedded content, such as CSS and JavaScript, including AJAX (i.e. XHR) calls, may have to be crawled and will consume a site’s crawl budget. Similarly, long redirect chains may have a negative effect on crawling.”

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.