I have a jpg that it has 414 KB. For different reasons I need it to be png. I tried to export it to png and then it is 2.1 MB. Is there a way to export from jpg to png with similar size and similar quality?

More details: I tried with different images and the results are similar. I tried Photoshop and Gimp and the size where exactly the same.

I need to be png because these img upload to a php automatic page where all the img are png. To accept sometimes png and sometimes jpg I would need to change a lot of code.

In the examples I provide both img are 2000px x 1000px at 300dpi
The jpg is 143KB the png 629KB

enter image description here enter image description here

  • 1
    Depending on the image your quality may actually be better with a smaller file size. Posting the image in question would go a long way
    – BANG
    Commented Jul 21, 2017 at 14:08
  • Please add more information (the "different reasons" for one) and the image. Commented Jul 21, 2017 at 16:05
  • @mayersdesign: I updated the question
    – Nrc
    Commented Jul 21, 2017 at 16:41
  • 1
    The answer to the question will mostly be "What have the JPEG and PNG file formats been designed for?", are it is very likely already answered on this site. For example in graphicdesign.stackexchange.com/questions/54549/… Commented Jul 21, 2017 at 17:15
  • Possible duplicate of Why do people use JPG images? Commented Jul 21, 2017 at 17:15

1 Answer 1


Since you seem to be talking more generally about any image rather than a specific image, the answer is generally no. The PNG and JPG formats work very differently and each is more appropriate for different kinds of images. Broadly speaking, JPG is more appropriate for images with a lot of varying detail (think photography) and PNG is more appropriate for simple images with solid blocks of color (think vector illustrations/cartoons or logos).

See Why do people use JPG images? and What web graphics formats to use?

So if your image was an export of a 1 color vector logo, you'd likely get a smaller file with better quality (you'll obviously only see better quality vs a separate JPG export from the original; you won't get an increase in quality by converting a JPG to PNG)... but if your image is a landscape photograph you're going to see a massive increase in file size. And there's not a whole lot you can do about it.

There are tools available to optimize PNGs which will save you on file size, but don't expect anything like JPG file sizes on complex photographs. See for example: What is the best way to create light-weight PNG images? and Tools for *lossy* PNG compression?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.