Jump to content

[SOLVED] What is the Image Link Format?


Recommended Posts

I am running a script for all the images.

 

But the problem is that the image URL is different sometimes

 

 

e.g. http://www.iparadise.com.au/46-92-large/iphone-4-crystal-clear-screen-protector-pack-of-2.jpg

 

46 is the product id and 92 is the image id

 

 

However, sometimes it doesn't need the product id.

 

e.g. http://www.iparadise.com.au/778-large/ipad-2-leather-flip-case-stand-brown.jpg

 

 

Why are there such differences? I want to make them into 1 format.

 

Thanks

Link to comment
Share on other sites

You are using SEO feiendly url of the images.

I suggest you use the original image url.

all related images should be under /img folder.

images for product is under /img/p

images for category isunder /img/c

images for manufacturer is under /img/m

and so on...

 

the image name format is also different for product, category,manufacturer,...

 

productid-imageid-size.jpg

categoryid-size.jpg

 

hope this gives you some hints.

Link to comment
Share on other sites

I realised the problem was because I upgraded prestashop versions with some pictures uploaded before and some after.

 

The new format is just imageId-large without product-Id. Folders are separated for every numerical digit.

 

Anyway, I have managed to write a PHP script renaming all the images in the p directory and classifying them into the proper folders. All images URLs are now consistent for me.

Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...