JPG and PNG image weight reduction

Hello to the community,
I’m new to photo retouching and have several questions.
I want to remove the background from a JPG image taken from a screenshot, which I managed to do by converting it to PNG format, but when I convert it back to JPG format, the background is restored.
If I’ve understood correctly, only the PNG format allows background removal.
My main objective was to obtain the largest possible image without background, while limiting it to GIF, JPG and PNG formats and to 500kb (the image is for an avatar). Hence my desire to switch back to JPG format, which takes up less space than PNG from what I’ve seen.
So I’ve tested online PNG compression software, choosing the quality of the image generated after increasing my basic PNG image (e.g. 60% compression), which just reduces the weight, but when I load it into my avatar profile a green background appears and the image remains small.
Is it possible to remove the background from a JPG image without switching to PNG format with GIMP or similar? Is there a trick to this?
How can I reduce the weight of a PNG image? I don’t care if the quality goes down. It would be better to use PNG so that I can work on the image as I please.
Thank you in advance for your answers.

No, there is no provision for transparency in the JPG format.

  • A format that allows both lossy compression and transparency is WebP, which is supported by all decent browsers, but not always by site servers.

  • You can reduce the file size of a PNG by making it color-indexed (*)(**). With Gimp this is Image > Mode > Color indexed and exporting to PNG with automatic pixelformat. Of course image quality may not be as good but on some image it works very well.

(*) like a GIF, but the color-index PNG still allows progressive alpha unlike PNG where alpha is all-or-nothing, so you keep the smooth edges.
(**) which is also what many PNG crunchers do.

1 Like

As already stated JPG files do not support transparency so save work as PNG or Tiff to save transparency. Also saving as xcf allows you to return to the image if you want to do further work later.

1 Like

I’m curious about the image being intended for an avatar, whereas avatars are usually quite small, maybe 80px wide - hardly any “weight” at all …

… and mercilessly butchered by the hosting site to save bandwidth.

Yes, took several goes to add mine yesterday without it being cropped by the circle.