Vinai / nicer-image-names

Magento extension to build catalog image file names from product attributes so they have neat descriptive names.
77 stars 31 forks source link

Nicer Image extension still follows original image url #22

Closed rolfeurope closed 9 years ago

rolfeurope commented 9 years ago

Hi there,

We had your extension for a while now and it works great. Since a few weeks Magento uses your nicer image url AND the original file name. Please see below:

http://www.littlerockstore.de/nirvana-baby-body-smiley.html The product image url: http://www.littlerockstore.de/media/catalog/product/cache/6/image/5e06319eda06f020e43594a9c230972d/n/i/nirvana_baby_onesie_smiley_baby/nirvana-baby-body-smiley.png

As you can see : nirvana_baby_onesie_smiley_baby is the original filename and used as a map and nirvana-baby-body-smiley.png is the nicer image extension.

The problem is that google denies this image in google because the double image name used.

Please help!

Thanks.

Magento 1.7.0.2

Vinai commented 9 years ago

Please post the result of the query:

SELECT * FROM core_config_data WHERE path LIKE 'catalog/nicerimagenames/%'
rolfeurope commented 9 years ago

I replaced the above html in stead of %name and now 90% off all products dont show images. Any further ideas? Thanks!

Vinai commented 9 years ago

Repeating myself: please post the output of the SQL query.

rolfeurope commented 9 years ago

I asked our technican. The result of the query is an empty result (0 rows, query took 0.0011 seconds).

Vinai commented 9 years ago

You must have in some way configured the extension through the system configuration in the Magento admin backend. The query would usualy output that configuration. Are you using the 100% default configuration? Or are you using some other third-party tool to manage the Magento configuration?

rolfeurope commented 9 years ago

Hi Vinai, we installed the extension again. Its the default configuration indeed. Could you take a look into our magento backend as emailed?

Vinai commented 9 years ago

The reason the extension uses the original file name as a folder is because that guarantees uniqueness. This is important if the same image is used for more then one product, or in more then one view.

The alternative would be to use an md5 hash or some similar algorithm to create the folders, but that wouldn't lead to nice looking paths, either. The md5 of nirvana_baby_onesie_smiley_baby is b45a19dc141c9f5fea2b84b7d781cae7. So with that change the URL would be

http://www.littlerockstore.de/media/catalog/product/cache/6/image/5e06319eda06f020e43594a9c230972d/b/4/b45a19dc141c9f5fea2b84b7d781cae7/nirvana-baby-body-smiley.png

Do you really think that is better? Another easy solution would be to simply not use the product name as the original file name.

rolfeurope commented 9 years ago

Thank you Vinai.

We will leave ot this way.

Thanks

Rolf

Vinai commented 9 years ago

Since you said it's important for google, I've added a new option in the extension system config to hash the folder name. If you try it, please let me know how it works for you. Anyway, I'll close the issue for now. Please feel free to reopen or create a new issue if required.

rolfeurope commented 9 years ago

Hi Vinai,

I will def. try this out and let you know.

Best, Rolf