WordPress.org

Forums

uploaded .png files change to .jpg (12 posts)

  1. RCSTP
    Member
    Posted 1 year ago #

    I have previously uploaded .png images and everything was fine. I just upgraded to the latest version of WP 3.6.1 and now when I upload .png image files, the files show up in the Media Library as .jpg files. Does anyobdy know what is going on and how I can upload my .png image files?

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    WordPress cannot "change" your image file extensions. Perhaps you have installed a plugin that is doing this?

  3. RCSTP
    Member
    Posted 1 year ago #

    I don't have a plugin that is doing this. When I download the file from the Media Library, the file name is .jpg Also, note that I have uploaded .png images in the past and this did not happen. I have the same plugins.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    I'm sorry but WordPress simply does not - and cannot - change image file types on the fly.

  5. liton1980
    Member
    Posted 1 year ago #

    Please deactivate all your plugin and test it by uploading a new PNG image to your library and see if the problem persists. WordPress can not do it by it's own and it needs plugins to do that.

  6. Caramboo
    Member
    Posted 1 year ago #

    I have a friend who sends me files called image.png but in actual fact they are JPEGS. I mocked her but she insists they are files uploaded from her iPad and they are originally named image.png.

    So, that got me thinking about this thread. I just renamed a file called test.jpg to test.png and uploaded it to a vanilla WordPress installation. Guess what, it got renamed to test.jpg.

    So, WordPress (PHP GD library?) would seem to realise the error and puts things right. I reckon the files being uploaded by RCTSP are in actual fact JPEGS.

  7. RCSTP
    Member
    Posted 1 year ago #

    I used http://www.imageoptimizer.net/Pages/Home.aspx to optimize a batch of .png files and the program added "optimized" to the file name but kept the same filename extension. However, it looks like the program actually converted the images to .jpg and WP recognized the file type even though the filename extension did not match the file type.

    [Moderator Note: Please ensure that you are embedding links correctly in your posts.]

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    That would indeed make sense. No CMS would depend entirely on a file extension to determine the correct file type. It would use the file's encoding to determine the correct file type.

  9. ryanruud
    Member
    Posted 11 months ago #

    I have the same problem. I have tried over and over to upload png files to my wordpress and they keep converting to jpg. One photo worked a while back. I don't know what the difference was. I've tried deactivating all my plugins and the same result png to jpg auto. Any suggestions on what to do?

  10. Ninjamankid
    Member
    Posted 10 months ago #

    Hi,

    same prob here - png's gets turned into jpg's. And even the file extension changes to .jpg. Could this be something set on the server and not in WP?

    Regards
    Johan

  11. jmdumais
    Member
    Posted 9 months ago #

    Today I had the opposite problem: jpgs were turned into pngs.

  12. jahrvos
    Member
    Posted 7 months ago #

    Same problem here. png changes into jpg when uploaded from my ipad. anybody found ananswer yet?

Topic Closed

This topic has been closed to new replies.

About this Topic