Link to home
Start Free TrialLog in
Avatar of Vikas Bhat
Vikas Bhat

asked on

Opencart Images not displayed

opencart website doesn't show image properly, showing them as broken links.

Permissions not an issue, images can be accessed if called via url directly
Avatar of lenamtl
lenamtl
Flag of Canada image

Hi,

Without a live link it's hard to say..

Does the images are located on your server?
Check image url https vs http, make sure you use https (store must have https cert installed and valid).
Check in console you may have JS errors using chrome right click inspect.
Check PHP errors logs.


Avatar of Vikas Bhat
Vikas Bhat

ASKER

Thankyou @lenamtl 
Our website is https://shakaonline.com/

Config: 
<?php // HTTP define('HTTP_SERVER', 'https://shakaonline.com/'); 
// HTTPS define('HTTPS_SERVER', 'https://shakaonline.com/');

Open in new window


the images are all located on the server and accessible properly via direct links.
https is installed and all fine

I saw some js errors but don't know what and how to fix.

PHP error logs don't say much

I understand my site images are showing as broken links if you visit https://shakaonline.com/shop


User generated image

but opencart adminuserprofile is also broken which is strange.



User generated image
Any help/clue to fix would be greatly appreciated

Hi,
first you don't have src /  no url / empty
<img src="" data-poip-product-id="135" alt="Belt-Hang-Sling-Hand" title="Belt-Hang-Sling-Hand" data-poip-status="loaded">

Open in new window


you don't have image on the product page too.
https://shakaonline.com/shop/belt-hang-sling-hand-cherry-red

Open in new window


So it look like no image attached to your product.

This occurred probably because your store is in the shop directory not in main directory
https://shakaonline.com/shop/
not at
https://shakaonline.com
so check the path for the image and change it
or change the config to use https://shakaonline.com/shop/

you also  have a JS error into the console this mean the access_token is wrong you need to change this or disable the feature
Uncaught Error: Error from Instagram: The access_token provided is invalid.

Open in new window

 
Thankyou I will check and try it, would you have any idea why all of a sudden it stopped working, all was fine till 5th Jan 2022
ASKER CERTIFIED SOLUTION
Avatar of lenamtl
lenamtl
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
More than likely you saw images because you had them locally on your computer and the browser filled them in for you.




Thankyou so much everyone specially lenamtl as you made me look in the right direction.I eventually found that hosting service provider upgraded the php and recreated the home as home2

so in the configs we were using andI replaced home with home2

define('DIR_APPLICATION', '/home/xxx/public_html/admin/'); 
define('DIR_SYSTEM', '/home/xxx/public_html/system/'); 
define('DIR_IMAGE', '/home/xxx/public_html/image/'); 
define('DIR_STORAGE', '/home/xxx/public_html/storage/'); 
define('DIR_CATALOG', '/home/xxx/public_html/catalog/');

Open in new window