1

My JSS app is not showing images though they exist. When I open the same link in my browser, then the browser is showing those images. I am getting the URL of my JSS image as

http://first-jss-app.dev.local/-/media/firstjss/images/brands/brand-banner.png

However I think we need to get images for JSS app with word "-/jssmedia/" which is something like

http://first-jss-app.dev.local/-/jssmedia/firstjss/images/brands/brand-banner.png

My question is how to get image URL with the "-/jssmedia/" word?

1

Looks like you have missed to follow the post-installation instructions of JSS.

Make sure you add the following to your web.config (system.webServer/handlers section):

<add verb="*" path="sitecorejss_media.ashx" type="Sitecore.JavaScriptServices.Media.MediaRequestHandler, Sitecore.JavaScriptServices.Media" name="Sitecore.JavaScriptServices.Media.MediaRequestHandler" />

Reference & Credits : https://www.creativeway.cloud/2018/09/27/issue-with-jss-media-library-urls/

| improve this answer | |
  • I have that entry in web.config file. – SurendrA SharmA Jun 17 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.