Jump to content

Issue with Google Export using Image Cache Link?


Dirty Butter

Recommended Posts

I've been checking the info on Google about the feed we've been sending them of late. I had never noticed it before, but the image url being sent is a cached image. We've had several items that Google "says" the images are invalid. No images are blocked by robots.txt.

 

Some of your items have problems related to images links. These might be because of broken image URLs that do work properly or because of missing 'image link' values or because the submitted image URLs are blocked by robots.txt.

I've checked in the feed itself, and the items they show with invalid images have perfectly good images, properly linked.

 

So, my question is - Is this happening because I might have cleared cache right before Google tests the feed?

 

Is it possible, or even advisable, to change the image feed url to the Source image, rather than the Cache image url? If so, what change would be needed in products.export.inc.php:

## Generate Image URL
			if (($images	= $GLOBALS['db']->select('CubeCart_image_index', array('file_id'), array('main_img' => 1, 'product_id' => $result['product_id']))) !== false) {
				$result['image']	= $catalogue->imagePath($images[0]['file_id'],$image_mode,$image_path,false);
			} else {
				$result['image']	= '';
			}
Link to comment
Share on other sites

"Is this happening because I might have cleared cache right before Google tests the feed?"

 

I would see that as a very astute hypothesis. If Google simply tests for the presence of the stated image (by URL), and the URL points to the size-rendered image in the cache (the medium size for the skin in use), and you clear the image cache after the feed file has been built, then yes, there will be no image available -- unless by some weird coincidence, CubeCart has had the need to rebuild the size-rendered images in the cache before Google has a chance to check.

 

If you really want the actual source image, in the file products.export.inc.php, about lines 38-49 are the properties of the googlebase feed. Change the value of $image_mode to 'source'.

 

Is this advisable? Only if Google has stated that images referenced in feeds must be of a certain size -- both minimum and maximum. If you have product source images that are 2000x1500px, you need to rethink something.

Link to comment
Share on other sites

I think you are both absolutely right and as Brian says the only problem with choosing the source image is that it *could* be too large in pixel size. I wonder if there should be a dynamic means to pull the images which checks to see if they exist first or some kind of automated task like a cron to make sure all image size variations exist.

I think the image cache will only clear in CubeCart from the maintenance section and not automatically from other areas. I'll make a note to check this in the morning.

Link to comment
Share on other sites

Normally it's rare that I would rebuild image cache, but I've been testing all the upgrade edits, so cache is disabled for now and I have had occasion to delete the image cache. Our uploaded files are only 600x600 pixels, so I'm going to change to the Source, rather than Cache - at least for now.

 

It's hard enough to show up in Google Searches as it is these days..

Link to comment
Share on other sites

I remember you saying that before, but I find it confusing that I've "disabled" Cache, but they are still there when I am working on the site via FTP. It's really a misnomer - maybe USE/Don't Use Cache would be more accurate and less confusing. But even at that - export DID you Cache lol.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...