Jump to content

Adding pictures to products.


Winterarmada

Recommended Posts

Hello all, new to the Prestashop frenzy myself. I have been looking around to find a convenient way to add product images quickly without resorting to: 

  • Paying for an expensive module that will not do the job at the end of the day 
  • Adding pictures manually one by one.

My current situation is this. I tried to include the Image_URL field on the .csv file of the product list I have obtained. It is in a folder uploaded to my server via FTP. I point to that directory directly in the CSV file. www.mywebsite.com/product_images/productidno.jpg where productidno is 1-1050. All images are in jpg format and the folder is accessible by the web. So if I type in my web-browser www.mywebsite.com/product_images/1.jpg it will load the image equivalent to ID 1.

Product import via CSV works fine, all products are added. But images do not show up, they show as broken link image.

After each import I clear cache. (Products, Brands, Categories, etc.)

When I go to Design>Image Settings > Regenerate Thumbnails, I get the error for all products "Original image is missing or empty (/home/x/x/img/p/x/x.jpg) for product ID x." 

So here is the fun part. IF I manually add the image in the corresponding folder that the "Regenerate Thumbnails" functionality states in the error message (img/p/.. ) ; as I already have the images numbered per productidno; the image shows up.

Is there any way to change the parameters/code so that the entirety of the "p" folder is accepted and I just move all the images in there in the root of the p folder without having to push manually one by one  1050 images in the equivalent folders inside the p folder?

Please let me know of any solution that you might think is the best appropriate course of action.

Link to comment
Share on other sites

Hi.
Do the folder and images have permissions set correctly?
The folder should have 0755 permissions and 0644 images.
Are the images too big?
You set the maximum size in the image administration.
If, when regenerating images, it prints an error that the image is missing in the img/p/x/ folder, it means that the database was written to during import, but the image was not copied and thumbnails were not created.

  • Like 2
Link to comment
Share on other sites

7 hours ago, 4you.software said:

Hi.
Do the folder and images have permissions set correctly?
The folder should have 0755 permissions and 0644 images.
Are the images too big?
You set the maximum size in the image administration.
If, when regenerating images, it prints an error that the image is missing in the img/p/x/ folder, it means that the database was written to during import, but the image was not copied and thumbnails were not created.

Permissions are set correctly. I can access the folder directly from the web. 0755.

Image size does not exceed 50kb for each image.

"If, when regenerating images, it prints an error that the image is missing in the img/p/x/ folder, it means that the database was written to during import, but the image was not copied and thumbnails were not created." - Yes I can attest to that. This is what I was thinking and maybe if there is any way to actually change the folder that prestashop saves the images, from img/p/x/ to img/p/ and paste them all there.

Link to comment
Share on other sites

1 hour ago, Winterarmada said:

Permissions are set correctly. I can access the folder directly from the web. 0755.

Image size does not exceed 50kb for each image.

"If, when regenerating images, it prints an error that the image is missing in the img/p/x/ folder, it means that the database was written to during import, but the image was not copied and thumbnails were not created." - Yes I can attest to that. This is what I was thinking and maybe if there is any way to actually change the folder that prestashop saves the images, from img/p/x/ to img/p/ and paste them all there.

I will change the settings and I will respond back. I do hope it is an image size problem. I will update accordingly. 

Link to comment
Share on other sites

I did check everything and apparently it was an issue with the image size and dimensions, although during import I was not getting any errors. It seems after changing both settings the issue resolved. Thank you for the heads up. A simple yet taunting mistake.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...