Problem: When I try to load the image as part of the web page, I get (blocked:other) as a response to the image request in the Chrome inspector (as opposed to 200 or 404). When I paste the image location into the address bar, it loads, so I know the path is correct. Same responses from Firefox.
Example path that loads directly in browser but not in web page/css: file:///Users/my-username/path-to-app/assets/images/give-them-beer/12-top-rated-ipas_1200.jpg
Example path that doesn't load anywhere (returns 404 in inspector): http://localhost/mysite.com/assets/images/give-them-beer/12-top-rated-ipas_1200.jpg
System info:
- I'm working on a localhost website (Mac, using MAMP + Apache).
- I'm using the latest version of Chrome.
Web site info:
- I am using CodeIgniter 3.x
- My assets directory is outside the application directory
- I am using the full filesystem path for the image.
- I am loading images as CSS background using inline styles
What I've investigated:
- I've tried localhost URLs and filesystem URLs
- .htaccess CSP options, though I can't find one that fixes the problem
- .htaccess XSS options, but again, I can't figure out how to get around it
- The MAMP permissions suggestions the comments. New permissions are:
- Localhost dir:
drwxr-x---+ 7 ME _www 238 Sep 10 09:37 DOCUMENTDIRECTORY
- Website dir:
drwxrwx---+ 15 ME _www 510 Sep 11 09:50 MYSITEDIRECTORY
- Localhost dir: