Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2010
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    png file not displaying on my website

    I don't know why, suddenly png files will not display on my website(jpg works). This is weird, I have directory like this,public_html/images/stories. When I put the png file on the images folder it will display it, but if I put the png files in stories folder, you will not see the image on the browser. Why this is happening? Is there a server/cpanel configuration to address this?
    Last edited by Anishgiri; 07-25-2013 at 10:15 AM.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,471
    Thanks
    6
    Thanked 980 Times in 953 Posts
    Do you have a link for us to demonstrate the issue?

  • #3
    New Coder 4B/75/73/41/'s Avatar
    Join Date
    Nov 2008
    Posts
    54
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by Anishgiri View Post
    I don't know why, suddenly png files will not display on my website(jpg works). This is weird, I have directory like this,public_html/images/stories. When I put the png file on the images folder it will display it, but if I put the png files in stories folder, you will not see the image on the browser. Why this is happening? Is there a server/cpanel configuration to address this?
    Try creating another 'images' folder within 'stories', put your .PNG files in there and report back.

  • #4
    Regular Coder
    Join Date
    May 2010
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I saw htaccess file in the public_html/images/stories folder. I tried to put a comment on this line AddType application/x-httpd-cgi .png, but when I tried to save it, it tells access deny. So what I did I create another folder, save all the files from stories folder, and rename that folder to stories. Then I edited again the htaccess and put a comment on AddType application/x-httpd-cgi .png. I successfully saved it. After dong this, the png file already appear.

    I never look at the htaccess of this site before, but I am wondering why there is AddType application/x-httpd-cgi .png. Is the purpose of this code is to prevent png file from displaying? Did I do the correct approach to solve the problem?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •