Convert your images from PNG to JPG online and for free, applying proper compression methods.
By default, WordPress supports png files to its media library. However, some hosts, (including mine), will block some filetypes for security reasons. In my case, one of the off-limits filetypes is png (image) files. You can change this by either employing the appropriate filter through code in either your theme’s functions.php file or a custom functionality plugin, as long as your host is not already using the appropriate filter to block said filetypes. I don’t plan on spending my afternoon trying to guess the priority I need to use to try to get around this. You can allow any filetype to be uploaded through WordPress’s wp-config.php file. If your host is blocking certain filetypes from being uploaded for whatever reason, they will likely not appreciate your using the wp-config constant, because when I say allow all filetypes, I really do mean allow all filetypes, or at least all filetypes supported by your web server software, which is quite an extensive list and really could introduce some security issues due to the way WordPress handles attachments: They’re a post type. Since I find myself in a situation where I need to upload a png file to my site for use as a featured image for a post, I needed a solution that was none of these and that was also accessible to a screen reader user.
Dealing with images is difficult when you can’t see them. Converting between image formats without compromising the quality of the original image is also difficult. If you’re sighted, you’d probably open the original file in your favorite image manipulation software, tweek compression rates and other stuff, and then re-save in the format you need. Most image manipulation software is inaccessible however, and so this method is off limits. So, I needed to find a tool I could use.
PNG2JPG meets all my requirements, and it might meet yours as well. It has a very simple interface, including a traditional browse button for uploading files, and it will handle all the background compression for you and return a jpg file which perserves the quality of the image. You can then upload the returned file because it’s likely your host isn’t blocking jpg files since that’s the most common image format and they’d likely lose customers hand over fist, even if they could claim a security reason for blocking that format.
If you find yourself in the same position I did, this tool should hopefully save you a lot of time, at least if you’re converting png files to jpg and you don’t feel like pinging a sighted person who’s good with images and has the right kind of software. Enjoy, and I hope you find it useful.
Thanks for the recommendation. This is a really common problem and using an online tool for solving it is actually a very good advice. I can also recommend using this tool to convert such types of files and many others too https://img-converter.com/en/convert/jpg-to-png/. It’s an extremely fast and simple app that converts files for free and doesn’t require any extra software.