News:

Support the VirtueMart project and become a member

Main Menu

Image path with full url issue

Started by mohtashimj, July 27, 2019, 11:03:14 AM

Previous topic - Next topic

Studio 42

Try to change :
$main_image_url1 = JURI::root().''.$product->images[0]->getFileUrlThumb();
$main_image_url1_p = JURI::root().''.$product->images[0]->getFileUrlThumb();

to

$main_image_url1 = JURI::root(true).$product->images[0]->getFileUrlThumb();
$main_image_url1_p = JURI::root(true).$product->images[0]->getFileUrlThumb();

Note that you added ''. this render nothing, but the main change is tu use JURI::root(true) to use relative path

mohtashimj

#16
Hi Buddy...

Got the issue. Images URL was changing due to the plugin "XT Adaptive Images".
I have disabled a plugin and all the image URL's are now displaying fine.

Thanks for all help and suggestions.