I have uploaded an image into the directory, and I have a link for it in my html page as an icon, but it is not showing when I visit my website. The url of the image is correct.
@website-creator said:
I have uploaded an image into the directory, and I have a link for it in my html page as an icon, but it is not showing when I visit my website. The url of the image is correct.
Hi there,
All what you need is set up some rules in .htaccess
file
some web software scripts needs special rules !.
try to add this on your .htaccess file
<Files ~ "\\.(jpg|jpeg|png|gif|pdf|txt|bmp)$"> allow from all </Files>
.
tell me if this worked with you
@MigaWeb I tried it, but it didn’t work! I added a new .htaccess file in my htdocs and added the code, but it is not working.
@website-creator said:
@MigaWeb I tried it, but it didn’t work! I added a new .htaccess file in my htdocs and added the code, but it is not working.
what is the web software you are using?
Usually, problems like this are caused because of not using the right URL. Common errors include:
- Uploading the image file to the wrong folder.
- Not specifying the URL correctly (did you know that
/images/background.jpg
andimages/background.jpg
could actually point to different locations). - CaSiNg IsUeS. Your website may work on your own Windows computer, but in Windows files are not case sensitive but our servers (like most web hosting servers) are.
@Admin I actually didn’t use Windows, and I know the url is correct because if I do ctrl+u (view page source), and select the image url, it is leading me to the correct file.
EDIT: Nvm, I think it just took time to show up in the website like css files usually do (I don’t know why), but the image is working now.
Did you try to embed the image on a different domain by any change? If so, that’s not going to work because of the forced hotlink protection. You need to upgrade your account to do hotlinking.