0

We are using DXA 2.0 with SDL Web8.5.We are publishing images to root structure group of the publication using custom template code but while we are trying to access the image using URL it always gives us 404 error.

I can see the entry of the image inside broker database.

  • How are you publishing (Topology Manager or old style Publishing) and is this an upgrade? The old Publication settings for image path and image URL used to influence where images are placed on servers as well as their URLs, but they no longer apply if using the "new style" publishing. – Alvin Reyes Jun 11 '18 at 16:30
  • @AlvinReyes i m using topology manager for publishing content.The images are publishing to broker database.if i publish images in /system/assets structure group it rendered fine but if i publish it in / (root) it gives 404 error. – Abdul Qadir Jun 11 '18 at 18:29
1

DXA has no OOTB support for images (or other media items) which are not published to the default location for media item (i.e. the Multimedia URL specified on the Publicatiom).

| improve this answer | |
  • is there any other way around to access images from ROOT of the website. – Abdul Qadir Jun 12 '18 at 9:54
  • You could create a custom Controller which serves your images. – Rick Pannekoek Jun 12 '18 at 17:15
  • Ah, I thought DXA might ignore the default image location if the setup was using "new style" publishing. What if the image path was "\" and the image url was "/" (or empty, I forget what was valid). Would that work to serve images from the root with DXA? – Alvin Reyes Jun 21 '18 at 19:31
  • Yes, it would, but it would also result in DXA expecting that your entire site consist of static content items (so, I wouldn't recommend it :-) – Rick Pannekoek Jun 21 '18 at 20:47

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.