Hello everyone, I’m facing an issue with an image ...
# suitecommerce
n
Hello everyone, I’m facing an issue with an image not appearing on my live site after deployment. In my local environment, the following code works fine and the image is displayed:
Copy code
<img src="{{getExtensionAssetsPathWithDefault 'img/Find-space-6.png'}}" alt="Home Office workspace" />
However, on the live site the image does not load. The image has been uploaded to the File Cabinet under: SSP Applications → Development → img Has anyone encountered this issue before or knows what might be causing it? Thanks in advance!
s
Probably because you only provided one value and not two
Try
getExtensionAssetsPath
instead
n
This isn’t working either:
Copy code
<img src="{{getExtensionAssetsPath 'img/Test-3.jpg'}}">
I wasn’t sure about the correct upload location for extension assets, so I uploaded the image to both : • SSP Application → Development → img folder • Website Hosting Files → Live Hosting Files → Images folder The image is still not appearing after deployment. Note: In my website record the selected folder for images is this one Website Hosting Files → Live Hosting Files → Images folder
s
Yes because that helper is only if you are uploading images with your extension
This is one of the first things it says on the doc I sent you
> Assets for any active extensions download to your Workspace/Extras/Extensions/EXTENSION_DIRECTORY/assets folder. Do not move, delete, edit, or add files in this location
So you need to decide which one you want to do. If you want to upload it manually to your file cabinet, you don't need the helper. If you want to include the image with your extension then you should use the helper.