2

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 Answer 1

3

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/

1
  • I have that entry in web.config file. Commented Jun 17, 2020 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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