Jump to content

Fresh Install - Product Images not showing


Recommended Posts

I've done a fresh install for my site, and just uploaded the first product (manually) to make sure everything is working. Unfortunately no images appear to be displaying, and when I try to open the image in a new tab, it just redirects to the home page....

 

Website: http://coolahcreations.com

 

Product: http://coolahcreations.com/1-tangle-wrangler-unscented.html

 

the .htaccess file is there

I have friendly URL's set.

 

Just can't get image to display :(

Link to comment
Share on other sites

another workaround

 

go to BO

preferences->images

add new

and the name similiar like "xxx_default" but without default, configuration like that also.

example: "large_default", then you add with name "large", the configuration/setting like "large_default"

Link to comment
Share on other sites

another workaround

 

go to BO

preferences->images

add new

and the name similiar like "xxx_default" but without default, configuration like that also.

example: "large_default", then you add with name "large", the configuration/setting like "large_default"

 

Tried this, but doesn't seemed to have solved my problem.

 

Looks like the theme is only compatible up to 1.4.9 :( Everything works fine except the image issue :( :(

Link to comment
Share on other sites

Hi there, I upgraded from Prestashop 1.4.9 to 1.5.1 and my images aren't displaying either. I have "regenerated" thumbnail images, "moved" the images and changed the setting to "no" on legacy image filesystem and no images are displaying. I can see the thumbnails in the back office but they don't appear in the store. I am not sure if there is something I need to change in htaccess and if so can you provide all the code for this as I am not a techie person. thanks

Link to comment
Share on other sites

Hey Guys,

 

Not sure if this is still needed but I have the solution for this (this is an expanded answer to the one 'vynx' gave).

 

Go to 'Images' under Preferences & recreate all the image settings without the "_default" (do not delete the existing _defaults these are still needed) i.e. 'small_default' becomes 'small' both are 45px by 45px & so on.

 

After you have done this, navigate to the 'Regenerate thumbnails' section (on the same page) & select 'All' for "Select image".

 

Now click the 'Regenerate thumbnails' button & now the images will be showing in the F.O.

 

For those that are wondering why the images are not showing, it is due to a change that has occured between ver. 1.5.0.18 to 1.5.1 where the images settings' names have been changed from "name" to "name_default" when PrestaShop initially installs (i.e. a fresh copy).

 

This means when the smarty tags used by the default theme's code to naviagate to images are called, they are looking for the original "name" not the new "name_default" images. All that has happen is that default theme has not been updated to reflect this change to the default image settings' new names.

 

If you're going from 1.5.0.18 to 1.5.1 you should not experience any issues as the original "name" image settings are still in your database.

 

Hope this helps.

 

Regards,

 

Chomp Creative.

  • Like 3
Link to comment
Share on other sites

I am unfortunately having this exact same problem - both for category images and product images.

 

This was a fresh install of 1.5.1 (with no products or categories added). I then upgraded to 1.5.2 and today I am trying to add categories and products. The default images which installed with Prestashop display, as does the company logo that I uploaded. But category and product images do not.

 

While in the BO I can preview the images in the Category and Product previews, i.e. if I edit the category or the product the images that I uploaded are visible in the web interface.

 

However, on the front end the images show as if they are missing or have bad links. Since the images appear through the BO the images are obviously there and Prestashop is "aware" of them.

 

I already have RewriteBase / in my .htacces file. I also tried ChompCreative's suggestion of adding the image sizes again under Preferences > Images so that I essentially have duplicates, i.e. small and small_default with the same settings. I regenerated thumbnails but to no avail, the images are still not displaying on the front end. My default browser is Firefox and on a whim I tried IE but the images aren't displaying there, either.

 

I've set the permissions to 755 on the /img/ folder, including its contents. The application seems to be looking for the category image in /c/3-category_default/cables.jpg. But if I browse to the /img/ folder there is no 3-category_default folder. However, there is a /img/3-cateogry_default.jpg which is, in fact, the image itself.

 

Any thoughts or suggestions would be appreciated! :)

Link to comment
Share on other sites

Hey Guys,

 

Not sure if this is still needed but I have the solution for this (this is an expanded answer to the one 'vynx' gave).

 

Go to 'Images' under Preferences & recreate all the image settings without the "_default" (do not delete the existing _defaults these are still needed) i.e. 'small_default' becomes 'small' both are 45px by 45px & so on.

 

After you have done this, navigate to the 'Regenerate thumbnails' section (on the same page) & select 'All' for "Select image".

 

Now click the 'Regenerate thumbnails' button & now the images will be showing in the F.O.

 

For those that are wondering why the images are not showing, it is due to a change that has occured between ver. 1.5.0.18 to 1.5.1 where the images settings' names have been changed from "name" to "name_default" when PrestaShop initially installs (i.e. a fresh copy).

 

This means when the smarty tags used by the default theme's code to naviagate to images are called, they are looking for the original "name" not the new "name_default" images. All that has happen is that default theme has not been updated to reflect this change to the default image settings' new names.

 

If you're going from 1.5.0.18 to 1.5.1 you should not experience any issues as the original "name" image settings are still in your database.

 

Hope this helps.

 

Regards,

 

Chomp Creative.

 

Thank you a lot, your post really save me !

Link to comment
Share on other sites

I am unfortunately having this exact same problem - both for category images and product images.

 

This was a fresh install of 1.5.1 (with no products or categories added). I then upgraded to 1.5.2 and today I am trying to add categories and products. The default images which installed with Prestashop display, as does the company logo that I uploaded. But category and product images do not.

 

While in the BO I can preview the images in the Category and Product previews, i.e. if I edit the category or the product the images that I uploaded are visible in the web interface.

 

However, on the front end the images show as if they are missing or have bad links. Since the images appear through the BO the images are obviously there and Prestashop is "aware" of them.

 

I already have RewriteBase / in my .htacces file. I also tried ChompCreative's suggestion of adding the image sizes again under Preferences > Images so that I essentially have duplicates, i.e. small and small_default with the same settings. I regenerated thumbnails but to no avail, the images are still not displaying on the front end. My default browser is Firefox and on a whim I tried IE but the images aren't displaying there, either.

 

I've set the permissions to 755 on the /img/ folder, including its contents. The application seems to be looking for the category image in /c/3-category_default/cables.jpg. But if I browse to the /img/ folder there is no 3-category_default folder. However, there is a /img/3-cateogry_default.jpg which is, in fact, the image itself.

 

Any thoughts or suggestions would be appreciated! :)

 

Hi alanmp,

 

Sorry the fix didn't work for you.

 

Another way of getting around this issue is to go directly into whatever theme you are using and modify the image tags that PrestaShop is calling.

 

For example in 1.5.0.18 the default theme's 'product.tpl' on line 184, had the <img> tag using the 'src' attribute used to read like 'src="{$img_prod_dir}{$lang_iso}-default-large.jpg"' but now in 1.5.1 onwards the 'src' attribute reads like this 'src="{$img_prod_dir}{$lang_iso}-default-large_default.jpg"'.

 

As you can see when 1.5.1 was release PrestaShop has modified how images are called; so if you have the ability to jump into your theme code and modify it by adding '_default' to the images being called, this should be the fix you need.

 

Kind Regards,

 

Chomp Creative.

Link to comment
Share on other sites

@Benjamin Utterback, I tried a fresh install of PrestaShop 1.5.2.0 but unfortunately I still have the same problem.

 

I blew away the SQL database and deleted all of the PS-related files. I created a new SQL database, downloaded 1.5.2.0.zip, uncompressed and applied chmod 755 to all files/folders prior to installation. Installation was smooth with no errors. I then renamed the /admin/ folder and deleted the /install/ folder.

 

I created a new category and uploaded its image. It still fails in the same way: I can see the image under the category's properties in the back end, but the image shows as missing on the front end.

 

Is it possible that somehow the friendly url/mod_rewrite isn't functioning correctly and that could be the cause?

 

When I log into the admin side I've got a green checkmark next to URL rewriting (and shop enabled, index rebuilt after update and .htaccess file up-to-date). However, when I check in Preferences > SEO & URLs there is a warning under Set up URLs: URL rewriting (mod_rewrite) is not active on your server or it is not possible to check your server configuration. If you want to use Friendly URLs you must activate this mod.

 

I've manually checked the .htaccess file in case something was overwritten. But ReWritebase / is still there.

 

I also tried ChompCreative's suggestion again about adding similar image sizes under Preferences > Images, e.g. small, medium, large, etc. with the same values as the corresponding small_default, medium_default...

 

Are there any other suggestions that anyone might be able to offer? I appreciate the assistance that everyone has been extending.

 

Regards,

Alan

Link to comment
Share on other sites

Hi alanmp,

 

Sorry the fix didn't work for you.

 

Another way of getting around this issue is to go directly into whatever theme you are using and modify the image tags that PrestaShop is calling.

 

For example in 1.5.0.18 the default theme's 'product.tpl' on line 184, had the <img> tag using the 'src' attribute used to read like 'src="{$img_prod_dir}{$lang_iso}-default-large.jpg"' but now in 1.5.1 onwards the 'src' attribute reads like this 'src="{$img_prod_dir}{$lang_iso}-default-large_default.jpg"'.

 

As you can see when 1.5.1 was release PrestaShop has modified how images are called; so if you have the ability to jump into your theme code and modify it by adding '_default' to the images being called, this should be the fix you need.

 

Kind Regards,

 

Chomp Creative.

 

 

I changed the product.tpl file in my theme directory, as suggested, and problem with images still remains...

Any suggestions??

 

Thanks

Link to comment
Share on other sites

Hello, can you change the .tpl back to its original state. Turn your error reporting on in your /config/config.inc.php

and change around line 29 "Display Errors On"

and above that line turn on, or true "SQL Debug"

 

 

 

Please use Google chrome is you have it to open your website,

go to the page with the missing images and right click to select Inspect Element.

Then navigate to "Console" on the Google Chrome Inspect element bottom pop up screen.

 

Let me know if you see any errors at all.

 

Thank you!

Link to comment
Share on other sites

Hello, can you change the .tpl back to its original state. Turn your error reporting on in your /config/config.inc.php

and change around line 29 "Display Errors On"

and above that line turn on, or true "SQL Debug"

 

 

 

Please use Google chrome is you have it to open your website,

go to the page with the missing images and right click to select Inspect Element.

Then navigate to "Console" on the Google Chrome Inspect element bottom pop up screen.

 

Let me know if you see any errors at all.

 

Thank you!

 

 

Hi Benjamin,

 

I am not a developer... : )

I think I have the tpl file back in its original state. (src="{$img_prod_dir}{$lang_iso}-default-large.jpg)

I got the images to work on BO and FO by going to Preferences>Images and removing the _default from the names, except on the small_default one, since that one seems to be for BO.

 

Thanks.

Link to comment
Share on other sites

Benjamin,

 

Using Chrome, Inspecting the Element > Console I get: Failed to load resource: the server responded with a status of 404 (Not Found)

 

The path where it's looking for the image is www.domain.com/c/3-category_default/cables.jpg

 

I found this thread in which someone mentioned turning off Friendly URLs. When I turn them off in Preferences > SEO & URLs the

images display correctly. When I re-enable Friendly URLs the images are missing again.

 

Reminder that this was a fresh install of 1.5.2.

 

Thanks again for your help,

Alan

Link to comment
Share on other sites

horraaah!! but..!??! .. finally after spent 2hr searching this "picture" bugs .. solved this problem .. i'm using 1.5.2, modify the default template a bit.

 

- changing folder chmod into 777

- delete the "_default" text under "Preference - Images" .. ex. "small_default" become "small"

- Select image: "All" - Regenerate Thumbnails - Checked box .. click "Regenerate Thumbnails"

- done.

 

next problem is: on "Viewed product" blocks .. the thumbnails are not showing ..

and also missing thumb on "Product" - "Images" page on BO ..

i think i will try my luck .. "again" with another tricks.

 

.. my first week with prestashop .. "amazing!" <_<

Edited by punyaixan (see edit history)
  • Like 1
Link to comment
Share on other sites

aight .. it's driving me crazy .. uploading simple image for products so complicated ever in my live .. WPCommerce/OC/OsCommerce never such this hard.

 

Changing "small_default" (and all his friends) in to "small" + SEO & Friendly URL's ON/OFF + Moved Image + Regenerate Thumbnails + Legacy bla bla bla .. and other things that i sort out .. never gave me satisfaction .. on some accidentally click, old uploaded images is allright. displayed everywhere except on BO .. but again the NEW PRODUCT that i've been created and insert the image for it .. it won't show it on FO. i do "energy waste" again with "Moved Images" and it's frends .. still wont show ..

 

and then .. i think this "small_default" should be "important" .. since its from fresh install, i don't think every 1.5.2 installer should tweak it manually to "small" to solve their problem .. so i guess it's "my own prestabugs" due respective prestahop developer effort for all of us.

 

i solve it with my own way since i don't know and i don't care what is .htaccess, i don't even know how to generate it automatically from prestashop .. (==> i really appreciate if someone could teach me step by step creating or editing .htaccess, i can't found it loud and clear on this forum).

 

aight .. here is my step,

 

1. Delete all the current products images (without deleting the current data) - since my data test only 3 record

 

2. Add manually this preference all the "small_default" but without "_default" .. more to duplicate it. you can see it below .. i don't know what happen when i upload this site in to hosting.

1 small_default 45 px 45 px enabled.gifenabled.gifenabled.gifenabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 2 medium_default 58 px 58 px enabled.gifenabled.gifenabled.gifenabled.gifdisabled.gifenabled.gifedit.gif delete.gif 3 large_default 264 px 264 px enabled.gifenabled.gifenabled.gifenabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 4 thickbox_default 600 px 600 px enabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 5 category_default 500 px 150 px disabled.gifenabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 6 home_default 124 px 124 px enabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 7 scene_default 520 px 189 px disabled.gifdisabled.gifdisabled.gifdisabled.gifenabled.gifdisabled.gifedit.gif delete.gif 8 m_scene_default 161 px 58 px disabled.gifdisabled.gifdisabled.gifdisabled.gifenabled.gifdisabled.gifedit.gif delete.gif 9 small 45 px 45 px enabled.gifenabled.gifenabled.gifenabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 10 medium 58 px 58 px enabled.gifenabled.gifenabled.gifenabled.gifdisabled.gifenabled.gifedit.gif delete.gif 11 large 264 px 264 px enabled.gifenabled.gifenabled.gifenabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 12 thickbox 600 px 600 px enabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 13 category 500 px 150 px disabled.gifenabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 14 home 124 px 124 px enabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifdisabled.gifedit.gif delete.gif 15 scenes 520 px 189 px disabled.gifdisabled.gifdisabled.gifdisabled.gifenabled.gifdisabled.gifedit.gif delete.gif 16 m_scene 161 px 58 px disabled.gifdisabled.gifdisabled.gifdisabled.gifenabled.gifdisabled.gifedit.gif delete.gif

 

3. Renegerate Thumbnails

 

4. Add again the images

 

5. Done.

 

i don't know the effect if i had old images without deleting it, maybe someone would expreience the differents because you had tons of product images that impossible to add it from zero.

 

if you think it's wrong way .. please tell the road to heaven .. because this is the way i got to make me happy.

i'll do the best i can to get this pretashop works well (for me .. for now) .. since i want to use it for my own webshop store.

 

cheers,

ixan.

Link to comment
Share on other sites

For those that are still experiencing this problem, what version of PrestaShop is your current theme compatible with?

 

I am asking this because as stated in my previous post, this issue is being caused by a change made (in PrestaShop ver. 1.5.1) to the <img> tags' "src=" attribute that PrestaShop uses to call/generate the image files in the FO.

 

This change is specific to the smarty code/function used by PrestaShop to handle calling/generating of images in FO when a user navigates through either product categories, individual product pages or pages dependent upon default image types.

 

Previous to ver. 1.5.1 the smarty code/function used looked like 'src="{$img_prod_dir}{$lang_iso}-default-large.jpg"' but now has been changed to 'src="{$img_prod_dir}{$lang_iso}-default-large_default.jpg'.

 

As you can see the only real change is that "_default" has been added after the "-large" (in this example, could be small. medium or etc.) and before the ".jpg" image type.

 

There is two methods of patching/quick-fixing this issue:

 

1.

 

Go to 'Images' under Preferences & recreate all the image settings without the "_default" (do not delete the existing _defaults these are still needed) i.e. 'small_default' becomes 'small' both are 45px by 45px & so on.

 

After you have done this, navigate to the 'Regenerate thumbnails' section (on the same page) & select 'All' for "Select image".

 

Now click the 'Regenerate thumbnails' button & now the images will be showing in the F.O.

 

2.

 

Go directly into whatever theme you are using and modify the image tags that PrestaShop is calling.

 

For example in 1.5.0.18 the default theme's 'product.tpl' on line 184, had the <img> tag's 'src' attribute read like 'src="{$img_prod_dir}{$lang_iso}-default-large.jpg"' but now in 1.5.1 onwards the 'src' attribute reads like this 'src="{$img_prod_dir}{$lang_iso}-default-large_default.jpg"'.

 

Please note: that these patches/quick-fixes will work if your base theme is compatible with PrestaShop ver. 1.5 in general. But if your theme is prior to ver. 1.5 (i.e. ver. 1.4 - 1.1) then chances are that your custom theme is incompatible with ver. 1.5 & you may have to update this theme either via the original theme vendor or by starting from scratch.

 

Also, lanijulmar I'll try to get some time this weekend to look at this "JqZoom" bug for you.

 

Regards,

 

Chomp Creative.

  • Like 2
Link to comment
Share on other sites

Everyone:

 

I have been having this problem of category and product images not working for all iterations of PS 1.5. I had done 1-Click-Upgrades, manual upgrades, fresh installations, added "small", "medium", etc. image sizes in addition to the "_default" images sizes, set permissions to 777 across my entire site... (I was desperate, what can I say?!) but nothing ever worked.

 

Tonight I thought that I would blow the entire site away [again] and start from scratch [again] and do a very methodical test.

 

And my testing worked! I can see category images and product images now! I did not have to create "small", "medium", etc.

 

I kept a precise log of my steps so that I could report exactly what I did:

  1. Deleted all web site files and my SQL database.
  2. Created a new, empty database and re-uploaded the Prestashop 1.5.2 files to my hosting provider.
  3. Recursively set all folder permissions to be 755.
  4. Recursively set the /img/ folder (and subfolder) permissions to be 777.
  5. Installed Prestashop.
  6. Deleted /install/ folder, renamed /admin/ folder.
  7. Logged into the BO.
  8. Preferences > SEO & URLs > Enabled Friendly URLs. This created my .htaccess file.
  9. Preferences > Images >
     
    Enabled "Use PNG only if the base image is in PNG format".
    Clicked "Move Images" button.
    Clicked "Regenerate Thumbnails" button.
     
    Note that the "Use the legacy image filesystem" option was already set to No by default so I did not change that. Also note that I have not yet uploaded any images into the system.
  10. Catalog > Categories and created the first category, including the category image. This is the first image that was uploaded.

I tested and the category image appeared in the FO. I then created a new product and uploaded four images for it. The product appears in the FO, as well as all of the images.

 

I hope that this is some help to you.

 

Luckily I had the luxury of being able to delete the entire site, as I had not yet loaded any products. Thanks to Benjamin Utterback, ChompCreative, punyaixan and others for their suggestions that kept me trying different things (and of course to the entire PS team for such a great product!).

 

Alan

Link to comment
Share on other sites

Hello alanmp, given that 1.5.1 was a fresh install. Would you be against doing another fresh install of 1.5.2 this has solved some of the image problems that were in 1.5.1

 

1.5.2 not solve the problem :-(

I have the same problems!

 

1) if i create a new product, the image is show in the BO but not in FO

2) if i upload a CSV importing products it's the same thing... images appears in BO but not in FO

 

What can i do?!

THX

Link to comment
Share on other sites

 

Also, lanijulmar I'll try to get some time this weekend to look at this "JqZoom" bug for you.

 

 

 

Chomp Creative.

 

Hello Chomp Creative :)

Have you (or anyone else) found a solution to my problem please ?

The pictures appear but the zoom does not function :(

Thanks in advance

Link to comment
Share on other sites

I have the same problem, even fresh install on my PC, using XAMPP (not always!).

On 1st try I had product images on main page, but not in categories / product page.

On 2nd try (fresh install) everything was ok (YAY!), so I copied whole shop on my hosting ... and almost all product images are gone (except main page) :/

 

v.1.5.2 is still buggy :|

Link to comment
Share on other sites

Hey Guys,

 

Not sure if this is still needed but I have the solution for this (this is an expanded answer to the one 'vynx' gave).

 

Go to 'Images' under Preferences & recreate all the image settings without the "_default" (do not delete the existing _defaults these are still needed) i.e. 'small_default' becomes 'small' both are 45px by 45px & so on.

 

After you have done this, navigate to the 'Regenerate thumbnails' section (on the same page) & select 'All' for "Select image".

 

Now click the 'Regenerate thumbnails' button & now the images will be showing in the F.O.

 

For those that are wondering why the images are not showing, it is due to a change that has occured between ver. 1.5.0.18 to 1.5.1 where the images settings' names have been changed from "name" to "name_default" when PrestaShop initially installs (i.e. a fresh copy).

 

This means when the smarty tags used by the default theme's code to naviagate to images are called, they are looking for the original "name" not the new "name_default" images. All that has happen is that default theme has not been updated to reflect this change to the default image settings' new names.

 

If you're going from 1.5.0.18 to 1.5.1 you should not experience any issues as the original "name" image settings are still in your database.

 

Hope this helps.

 

Regards,

 

Chomp Creative.

 

I had the same problem. The solution quoted worked.

Link to comment
Share on other sites

Hello Chomp Creative :)

Have you (or anyone else) found a solution to my problem please ?

The pictures appear but the zoom does not function :(

Thanks in advance

 

Hi lanijulmar,

 

Sorry to say I couldn't reproduce the bug with the zoom.

 

But thats not the end, what version of PrestaShop are you using, is this a clean install or an updated store you working on & what version of prestashop is your theme compartible with?

 

I had the same problem. The solution quoted worked.

 

Hey AFemaleProdigy,

 

I am glad it worked for you! Enjoy :)

 

Regards,

 

Chomp Creative.

Link to comment
Share on other sites

Hey everybody,

 

I know that I posted the detailed steps that solved my image problem last week... but when I got back to the development tonight I'd get a 'Page not found' error when clicking the Login link. I had that problem a few 1.5.2 installations ago and had fixed it then! And now when I saw it again... well, if I had a pen nearby I probably would have stabbed myself in the face.

 

I've always felt that my .htaccess file has been a lurking menace/cause somewhere for me in all of this, I downloaded ExamDiff. It's a small, free program which examines two files and visibly shows you the differences.

 

I still have a copy of my old .htaccess file where images did not work, but the Login did. I used ExamDiff to compare that .htaccess file with the one I'm using now where images do work, but Login does not.

 

Comparing the two files, I was able to add/remove lines of code to get images working, as well as the Login.

 

Perhaps the .htaccess file is the issue for some of you, as it was for me. I use GoDaddy, so YMMV with this file, but I've posted it below. Replace the "www.yourwebsiteaddress.com" text with your web site address.

 

To use:

  1. Make a backup copy of your existing .htaccess file. I cannot stress that enough. Make a backup copy. It should be in the home folder (root) of your site.
  2. Edit the .htaccess file, replacing all of the text with the text below. If it does not work for you, or wrecks things even worse than they were, you can replace the edited file with the copy you backed up in step one. You did make a backup, right? ;)
  3. If you decide not to use this file you may want to compare the contents with your .htaccess. Maybe you'll be able to make the necessary changes like I did.

#Fix Rewrite

Options -Multiviews

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution

# http://www.prestashop.com - http://www.prestashop.com/forums

 

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule . - [E=REWRITEBASE:/]

RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

 

# Images

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]

 

# Dispatcher

RewriteCond %{REQUEST_FILENAME} -s [OR]

RewriteCond %{REQUEST_FILENAME} -l [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^.*$ - [NC,L]

RewriteCond %{HTTP_HOST} ^www.yourwebsiteaddress.com$

RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]

</IfModule>

 

<IfModule mod_expires.c>

ExpiresActive On

ExpiresByType image/gif "access plus 1 month"

ExpiresByType image/jpeg "access plus 1 month"

ExpiresByType image/png "access plus 1 month"

ExpiresByType text/css "access plus 1 week"

ExpiresByType text/javascript "access plus 1 week"

ExpiresByType application/javascript "access plus 1 week"

ExpiresByType application/x-javascript "access plus 1 week"

ExpiresByType image/x-icon "access plus 1 year"

</IfModule>

 

FileETag INode MTime Size

<IfModule mod_deflate.c>

AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/css

AddOutputFilterByType DEFLATE text/javascript

AddOutputFilterByType DEFLATE application/javascript

AddOutputFilterByType DEFLATE application/x-javascript

</IfModule>

 

#If rewrite mod isn't enabled

ErrorDocument 404 /index.php?controller=404

 

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

 

<IfModule pagespeed_module>

ModPagespeed on

ModPagespeedEnableFilters extend_cache

</IfModule>

Link to comment
Share on other sites

Hi lanijulmar,

 

Sorry to say I couldn't reproduce the bug with the zoom.

 

But thats not the end, what version of PrestaShop are you using, is this a clean install or an updated store you working on & what version of prestashop is your theme compartible with?

 

 

Thanks very much Chompcreative to spend time for me

I'm using 1.5.2 prestashop version and it was an update, but without store, I'm creating it. I think my theme is compatible as it is made with "prestashop theme maker" and it's said to be compatible with 1.5.2

 

Many thanks in advance

Link to comment
Share on other sites

I am fighting this problem know for a few houers. I am almost at the point to install it again. But can not stand it that i got this problem.

 

Yesterday fresh install PS 1.5.2. Put some bogus data in it and this was working for a while. Then is did some settings to get to know ps and installed a new theme. Wich created this i don't know. I did not edit my htaccess but i think it is an path issue.

 

If i inspect the path with chrome as sugested i see this path:

 

/39-large_default/23-rasefrwe-efwqefwq.jpg

 

If i take a look in /img/p/

 

then i see a image that looks like the right one with the name:

 

12-39-medium_default.jpg

 

I don't know how PS is making a correct path but that isn't the right one.

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

I just installed a fresh copy and now knowing this issue is out there i found out where it go wrong with my shop.

When i switched to my own theme. I have made a theme on basis of the default theme. But now the images are not working anymore.

So i need to debug my theme now. I will keep you posted.

 

Edit:

I have copied al the contents of the default theme to the directory where my own theme is in and still have the problem. All the colors etc are back to the default colors. Only the path to the image does not work.

 

 

If i look in the code i have this: (using FF firebug)

 

/myshop.com/1-large/aldotest.jpg

 

if i change this to

 

/myshop.com//1-large_default/aldotest.jpg

 

Adding the _default bit it show up. So something is wrong there !

 

EDIT 2:

I think somethings is wrong with the image path and the template name.

The default theme is called default. The missing part in the path is _default.

I just started with prestashop but if i copy everyting from themes/default to themes/mytheme it fails to show the images and has a path as described. (/myshop.com/1-large/aldotest.jpg)

So the theme name is missing there ?

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

Ok, I'm at my wits end. I have 2 PS's, both are 1.5.2, 1 of which was just brought up to 1.5.2 today and today I decided to add a few products. Store 1 and 2 are totally different URL's and databases... store 2, the one I updated to 1.5.2 images are not showing up in frontend. Thumbnails show.

Link to comment
Share on other sites

Hi guys! i had the same problem, but I just solved it.

The problem was in product-list.tpl.

 

In my template the code was <a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home-list')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /></a>

 

I changed that to this:

 

<a href="{$product.link|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /></a>

 

And now everything is working!

 

Give it a try, it worked for me!

Link to comment
Share on other sites

  • 3 weeks later...

another workaround

 

go to BO

preferences->images

add new

and the name similiar like "xxx_default" but without default, configuration like that also.

example: "large_default", then you add with name "large", the configuration/setting like "large_default"

Hey Guys,

 

Not sure if this is still needed but I have the solution for this (this is an expanded answer to the one 'vynx' gave).

 

Go to 'Images' under Preferences & recreate all the image settings without the "_default" (do not delete the existing _defaults these are still needed) i.e. 'small_default' becomes 'small' both are 45px by 45px & so on.

 

After you have done this, navigate to the 'Regenerate thumbnails' section (on the same page) & select 'All' for "Select image".

 

Now click the 'Regenerate thumbnails' button & now the images will be showing in the F.O.

 

For those that are wondering why the images are not showing, it is due to a change that has occured between ver. 1.5.0.18 to 1.5.1 where the images settings' names have been changed from "name" to "name_default" when PrestaShop initially installs (i.e. a fresh copy).

 

This means when the smarty tags used by the default theme's code to naviagate to images are called, they are looking for the original "name" not the new "name_default" images. All that has happen is that default theme has not been updated to reflect this change to the default image settings' new names.

 

If you're going from 1.5.0.18 to 1.5.1 you should not experience any issues as the original "name" image settings are still in your database.

 

Hope this helps.

 

Regards,

 

Chomp Creative.

 

I also had this problem with fresh install of PC 1.5.2 with prestadevelop theme.

Followed this answer and the problem was solved.

 

Now all the pictures are displaying.

 

Thank you for excelent answer.

Link to comment
Share on other sites

  • 3 weeks later...

Hi all,

 

I also had troubles with my product images. No solution described above worked for me. My category images were showing fine, unlike those on products. My Prestashop version is 1.5.2.

 

I found out the problem was a redirect loop on the images. You can see if this is also your problem when you open your site in Chrome, then right click any image that is not showing and select "Inspect Element". A tab will show up in the bottom of the page; from its top menu select "Console". If you see anything about redirect loop, then you have the same issue I had.

 

The idea of this is to change the link to the image in friendly form, so that the pattern of the link is different from the real path. I chose to add "p/" just after the website name, you can actually choose whatever letter or word you like.

 

You will have to edit your .htaccess file and your /classes/Link.php file. Backup these files in case something goes wrong.

 

Let's start with the Link.php file. Download it and open for editing. We will edit the public function getImageLink.

Go to line 365

 

$uri_path = __PS_BASE_URI__.$ids.($type ? '-'.$type : '').$theme.'/'.$name.'.jpg';

 

and change it to

$uri_path = __PS_BASE_URI__.'p/'.$ids.($type ? '-'.$type : '').$theme.'/'.$name.'.jpg';

 

and then on line 376 change this

 

$uri_path = __PS_BASE_URI__.$id_image.($type ? '-'.$type : '').$theme.'/'.$name.'.jpg';

 

to

$uri_path = __PS_BASE_URI__.'p/'.$id_image.($type ? '-'.$type : '').$theme.'/'.$name.'.jpg';

 

Save the file and close.

 

Download your .htaccess file from the root of your website and open it for editing. Search for the section that begins with "# Images". If you have multistore enabled, you will find more Images sections in this file. My first Image section begins on line 39.

 

You can see the regular expressions like this:

RewriteCond %{HTTP_HOST} ^www.yourwebsite.cz$

RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]

 

 

What you need to do is add the "p/" (or whatever you chose) right at the beginning after "^". So, it will look like this:

RewriteCond %{HTTP_HOST} ^www.yourwebsite.cz$

RewriteRule ^p/([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]

 

Edit all the rules in the image section (or sections), except the last ones, that already begin with "c/". These are the rules for category images, don't do anything with them. Save the file and close.

 

Upload both files to your server and refresh your FO. The images should be now showing.

 

 

Probably there would be a better solution, but this one is quite easy and at least - it works. Do not disable your friendly URL option, because once you enable it again, the .htaccess file regenerates and your changes will be lost.

 

Hope this helps!

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

  • 3 weeks later...
  • 3 months later...
  • 1 month later...

Having the exact same problem.

 

Created the image settings as described above but no change.

 

I didn't see in the instructions above whether or not to select or deselect the check box for, I left it checked. "Deselect this checkbox only if your server timed out and you need to resume the regeneration."

 

I didn't change the default settings in any way, now the images being generated still have the word default in them. I then tried turning off some the settings for the default images but it still was trying to create images with default in their name.

 

Really starting to become fed up with prestashop, starting to look at Magento as an alternative.

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

  • 2 months later...

Hello, I had the same problem with images desapearing.

Eaven when I inserted a new image I couldn't get to see it in the front office first page (I could see it in the product FO)

I switched my URL rewriting to yes and I can see my new image on the FO (not the old ones)!!

I am going to have to reinsert every image but at least I solved my problem.

 

I hope it will work for you also...

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

  • 8 months later...

Hello, can you change the .tpl back to its original state. Turn your error reporting on in your /config/config.inc.php

and change around line 29 "Display Errors On"

and above that line turn on, or true "SQL Debug"

 

 

 

Please use Google chrome is you have it to open your website,

go to the page with the missing images and right click to select Inspect Element.

Then navigate to "Console" on the Google Chrome Inspect element bottom pop up screen.

 

Let me know if you see any errors at all.

 

Thank you!

 

Hello Guys...
 
Some time ago I had the same problem... I have done everything I could... Then I did what friend Benjamin Utterback suggested... 
 
First  I did update to last version of PrestaShop (1.5.4.1) and choosed >Inspect Element< (right click on mouse over image). 
 
I realized that the images with name "-large_default.jpg" are not exist. 
 
So, I went to Prefences>Images and created large_default (127px X 127px) and thickbox_default (125px X 125px) {check only for products}. 
 
After this, in the bottom of tha same page, I regenarate All images, whithout select <Delete previous images>. The problem solved. I hope you find this information helpful.
Link to comment
Share on other sites

  • 11 months later...

Another way of getting around this issue is to go directly into whatever theme you are using and modify the image tags that PrestaShop is calling.

 

For example in 1.5.0.18 the default theme's 'product.tpl' on line 184, had the <img> tag using the 'src' attribute used to read like 'src="{$img_prod_dir}{$lang_iso}-default-large.jpg"' but now in 1.5.1 onwards the 'src' attribute reads like this 'src="{$img_prod_dir}{$lang_iso}-default-large_default.jpg"'.

 

As you can see when 1.5.1 was release PrestaShop has modified how images are called; so if you have the ability to jump into your theme code and modify it by adding '_default' to the images being called, this should be the fix you need.

 

 

Thank you very much ChompCreative for these explanations.
 
I have updated 2 prestashop 1.4 to 1.6 (manually 1.4 to 1.5 and with auto update to 1.6).
 
I can see images in product pages but i’m worried because i get a lot of traffic from google image and now i can see that images url have changed :
 
before :
http:www.my-domain.com/13-73-large/product_name.jpg

 

 
after :
 
The issue for me is it is bad for my ranking if image url are different.
 
Thanks to your explanation, i have modified my theme and delete the "_default" string.
Edited by Cloud Nine (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...