Jump to content

products pictures doesn't show on mobile devices


Recommended Posts

Hi, 

 

I hope that I am posting in the right place.

I have a problem when I try to test my web site on mobile device, when I get to  products of  a category I see their pictures so far every thing is good . but when I click on a product to see the detail and I click on previous to return back  ,pictures doesn't show up any more I got picture with question mark. 

 

thanks all 

Link to comment
Share on other sites

Have you cleared the PrestaShop cache?

 

Go to - Advanced Parameters / Performance   the clear cache button is on the top right

 

If you have changed the images it may be trying to display the non existent previous one.

 

Also be sure that your phone's cache is clear.

 

I like to turn off my cache in Desktop Firefox and using the developer's tools to view my sites in responsive mode.

This way if you replicate the problem on different devices it will help you track down the actual problem.

 

W-

Link to comment
Share on other sites

I found that the format small_default2x doesn't exist in performances ->images  that's why I got this errors.

 

Now I'm facing an other problem when I try to generate thumbnails of this new format i get this error : 

  1. Original image is corrupt (/home/orchidee/public_html/img/p/5/0/1/501.jpg) for product ID 298 or bad permission on folder

 

Or it will be better to change the javascript ?? but I'm not good with js. thanks for helping me

if($('.replace-2x').css('font-size') == "1px")
	{		
		var els = $("img.replace-2x").get();
		for(var i = 0; i < els.length; i++)
		{
			src = els[i].src;
			extension = src.substr( (src.lastIndexOf('.') +1) );
			src = src.replace("." + extension, "2x." + extension);
			
			var img = new Image();
			img.src = src;
			img.height != 0 ? els[i].src = src : els[i].src = els[i].src;
		}
	}
Edited by kassimi.hn (see edit history)
Link to comment
Share on other sites

 

I found that the format small_default2x doesn't exist in performances ->images  that's why I got this errors.

 

Now I'm facing an other problem when I try to generate thumbnails of this new format i get this error : 

  1. Original image is corrupt (/home/orchidee/public_html/img/p/5/0/1/501.jpg) for product ID 298 or bad permission on folder

 

Or it will be better to change the javascript ?? but I'm not good with js. thanks for helping me

if($('.replace-2x').css('font-size') == "1px")
	{		
		var els = $("img.replace-2x").get();
		for(var i = 0; i < els.length; i++)
		{
			src = els[i].src;
			extension = src.substr( (src.lastIndexOf('.') +1) );
			src = src.replace("." + extension, "2x." + extension);
			
			var img = new Image();
			img.src = src;
			img.height != 0 ? els[i].src = src : els[i].src = els[i].src;
		}
	}

You better change the original image for this product ID 298

/home/orchidee/public_html/img/p/5/0/1/501.jpg

 

if the image is really corrupt

Link to comment
Share on other sites

I would speak to the person who created the Theme

They should have included small_default2x   in preferences ->images with the install

 

I also agree that Tweb in that you should try replacing the image for that product then check the folder/directory permissions

Using the replace command should not be needed and will most likely cause you problems down the road.

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