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
PHP

Avatar of undefined
Last Comment
Vikas Bhat

8/22/2022 - Mon
lenamtl

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.


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




but opencart adminuserprofile is also broken which is strange.




Any help/clue to fix would be greatly appreciated

lenamtl

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

 
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Vikas Bhat

ASKER
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
lenamtl

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Scott Fell

More than likely you saw images because you had them locally on your computer and the browser filled them in for you.




Vikas Bhat

ASKER
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


⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.