I recently noticed that images are no longer appear on my website. It is an add-on domain name, but images are viewable in the parent domain. I've checked the paths in the code, the permissions for the images direcoty and the images themselves and can't figure it out. The images are viewable when I look at the pages stored locally on my pc The w3c seal is the only image that shows up and it originates from their site. I've re-uploaded both pages and images with no change. Images were viewable up until a few days ago. I checked with someone at another location and they can't view the images either. I've posted a link below. Any idea would be appreciated. Thanks.:?:

Dani AI

Generated

Good follow-up from . When images stop loading for a particular site the problem is usually server-side access rules or request handling rather than the HTML. The checklist and snippets below focus on practical, low-risk ways to find and fix that type of problem on shared hosting.

  • Reproduce the failure with a direct HTTP request and note the status code and headers:
    curl -I https://your-site.example/images/file.jpg
    A 200 means the web server served the file; 403/404 points to access or routing rules.
  • Use the browser Network tab to inspect the request and response headers (Content-Type, Referer, status). That often shows whether a referer rule or MIME mismatch is involved.
  • Isolate server rules: temporarily rename the site’s .htaccess (for example to .htaccess.bak) and retry the URL. If images return, the problem is in that file.
  • Check server error logs (via hosting panel or support). Error lines for the image URL usually say exactly which directive blocked the request.
  • On VPS/dedicated systems check file ownership and SELinux context; on shared hosts check for WAF/mod_security rules or control-panel hotlink settings.

If you need a short, safe directive to explicitly allow image files, use the syntax appropriate for your Apache version.

# Apache 2.4+
<FilesMatch "\.(jpe?g|png|gif|webp|svg)$">
  Require all granted
</FilesMatch>
# Apache 2.2
<FilesMatch "\.(jpe?g|png|gif|webp|svg)$">
  Order allow,deny
  Allow from all
</FilesMatch>

Test after each change, and keep a copy of the original .htaccess. If logs are unclear, gather the failing URL, a curl -I output, and a timestamp, then ask your host to check the server error log for that request.

I just noticed that four *.xcf (GIMP) files are the only thing that appears in the images directory when viewed by a browser. Apparently, recognizable image files are being blocked.

This is the error message I get when I attempt to view an individual image:

Forbidden

You don't have permission to access /images/contact2.gif on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Problem solved! There were lines missing from the .htaccess file. Tech support staff from my hosting company (namecheap.com) replaced the missing lines and all is well. To be specific, I was missing image anti-hot linking protection. Hope this helps someone. Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.