RW preview Shows 403 error of warehoused images

It might be a rookie mistake on my side, but couldn’t find a suitable solution online yet. I recently switched to warehousing images used in a RW project - I directly upload the images into a suitable folder/subfolder on the server (using CPanel or FTP), then link the complete file path in the image stack (could be any, e.g. Image(Source) or Parallaxer, etc.)

The linked images are not shown in the RW preview (V8.6.2), nor in a Safari Preview (the web console shows 403 errors) - however, when the project is uploaded to the server, all works just fine. The image folder structure is in the same domain, folders are ‘755’, all images ‘644’ - switching images also to ‘755’ makes no difference.

My current workaround is to design the page with copied images, then replace them with the warehoused image link before the uploading. It works, but it would be great if the warehoused images could be directly seen in the preview as well.

Am I missing any necessary setting changes above and beyond the ‘644’ or ‘755’ access privileges that could cause the 403 errors ? Thanks for sharing your expertise, much appreciated.

Without more information, it’s hard to what might be happening.

How are you warehousing the image(what stack)?

A screenshot of the settings for the image.

You said that the console gives you a 403 error, what does the image tag look like when you get the error? (just right click on the image and inspect the image).

Dear Doug,

thanks for your willingness to help despite my ‘lacking’ description. I was in the process to create a minimal test project in a subdomain, when I probably stumbled across the reason for the server responding with a ‘403’ error when trying to access the warehoused images.

While it might have been mentioned elsewhere, but I could not connect it to my problem until now. It looks like that I have an htaccess entry to prevent so-called “hotlinking” - this prevents others to access images unless referred from within the project itself. When I try to access the warehoused images from RW / my location, this line blocks me - i.e. a self-inflicted wound, lol.

RewriteCond %{HTTP_REFERER} !^*$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|svg)$ - [F,NC]

There are several ‘exception’ lines similar to the one shown here to exclude the error response, when called (?) from the website on the server. I wonder, whether it is a good idea to add my home IP address as another exception to let me access the images at least when at home? Or are there other better practices?

RewriteCond %{REMOTE_ADDR} !^111\.222\.333\.444

Thanks again for sharing your insights regarding those htaccess ‘hacks’

It’s difficult to give advice on htaccess directives without seeing the entire htaccess file, unaltered, being used and knowing the URL’s involved.

If you’d like to share the actual content of the htaccess file along with the URL of the site, what you’re trying to accomplish and the images URL’s, I’d be happy to have a look.

Quick follow-up: I added the IP address exception and it indeed shows the warehoused images in RW and Browser Preview now.

No need for anyone to spend their valuable time on the - now solved - very specific issue I was facing. The lesson learnt for me is that one needs to consider also the htaccess entries when there is odd and differing behaviour between the site on the server and the site being reviewed in RW.

Thanks again, Doug, your engagement made me find my mistake - and be it by just asking for a concise description and analysis of the situation, cheers.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.