Jump to content

Product Images Not Working


Recommended Posts

Hi all

I installed Prestashop and it was fine. I made some changes to the configuration and somehow the product images stopped working. They appear in the back office but not on the site. They point to the wrong link.

 

I created a new product called testimage1 to investigate and uploaded an image for it. When I go to the product page the image doesn't show. It points to the following link:

/35-large_default/testimage1.jpg

 

That folder 35-large_default does not exist. And obviously that testimage1.jpg can't exist without that folder.

 

Here's what I did:

Uploaded an image which was titled DSC00001.JPG

This uploaded successfully into the following folder /img/p/3/5/

That folder contains:

5-home_default.jpg

5-large_default.jpg

5-medium_default.jpg

5-small_default.jpg

5-thickbox_default.jpg

5.jpg

index.php

 

All those images are correct.

In Catalog > Products > Edit (testimage1) Images tab the thumbnail shows correctly with the following url:

/img/p/3/5/35-small_default.jpg and the full version it links to is correct /img/p/3/5/35.jpg

 

But like I said on the store product page it is linked as the non-existant /35-large_default/testimage1.jpg

 

Any ideas on how to fix this

 

Thanks

Edited by heidern (see edit history)
Link to comment
Share on other sites

I tried regenerating the thumbnails, I've moved the images, I've tried the legacy filesystem on and off. I've used the default theme, and a copy of it as a custom theme. All the combinations, none of them work. I haven't made any real changes. I uploaded a logo. I created a custom test module in my custom theme. I used live edit and removed most of the sidebar blocks. Haven't really delved into any of the code.

 

In Advanced Parameters > Configuration Information I see the following:

Optional parameters: Please fix the following error(s)

  • magicquotes

The images in the footer are fine. Also images in the modules work too, for example the newsletter block shows the letter image correctly.

Edited by heidern (see edit history)
Link to comment
Share on other sites

Ok, turns out I had friendly URLs enabled but mod_rewrite isn't enabled.

I've got RewriteEngine on in my .htaccess file which is in my shop root. I submitted a ticket to my host so hopefully they can do this.

In the meantime switching off friendly URLs has fixed the issue.

Link to comment
Share on other sites

My host said that mod_rewrite is enabled on their servers. They went on to say:

"This isn't a server issue, but rather a Prestashop issue.

We recommend checking with Prestashop developers or official site for a solution, as this problem is not caused by mod_rewrite or a server problem. Maybe images could need some additional mod_rewrite rules added to the .htaccess file."

 

Just to clarify, after further testing, friendly URLs are working for the pages, but they aren't working for the product images.

If I have friendly URLs off and click a link I correctly get:

/index.php?id_product=9&controller=product

If I switch friendly URLs on and click a link I correctly get:

/music-ipods/9-ipod-nano.html

 

Friendly URLs off correctly gives the following image:

/img/p/2/7/27-large_default.jpg

Friendly URLs on places the following image link on the page but it doesn't display, if I view the image it gives a 404:

/29-large_default/ipod-nano.jpg

 

Add to cart buttons are fine, footer buttons are fine. Just the product images that don't work.

Any ideas?

Link to comment
Share on other sites

  • 3 months later...

Same problem here. When I turn on Friendly Urls the product images disappear. Any solution?

you use default template? what ps version?

only product images disappear? also on product page (thickbox etc.)

and what about categories? manufactureres etc.?

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...