Compressing an photo is a matter of compromise. You will always lose data and the compressed photo will never be as good as the original. Your only choice is what kind of data (or combination thereof) you shed:
You can reduce the colors. This is what is done by many PNG "compressors", the ultimate step being the color-indexed images (with only 256 colors in the image, every pixel can be encoded on one byte). This is best avoided for photography.
You can reduce the pixels by scaling/cropping the image. If your 12MPix (4000×3000) image is 8MB, and you make it twice as small (2000×1500), you have divided the pixel count by 4 and with the same compression technique and parameters your file is 4 times smaller. This typically what happens when you "share" the image from your phone, the sharing apps make a smaller a version of the image.
You can reduce the definition in several more complex ways (a little bit of everything....), which is what is done in JPEG compression.
- Depending on intended usage, the first thing to do is to scale the image to a reasonable size. I cannot give hard numbers but something that fits a HD TV image is 1920×1080 (3830×2160 for 4K). This is done with
Image > Scale image:
You can then export to file. Use
File > Export as, pick a directory, and change the name to avoid overwriting your original image:
You then get this dialog:
And after clicking these two:
- Gimp displays a preview of the image as it will be saved
- The options dialog becomes this:
Your main option is the
Quality slider, but the
Subsampling option is often overlooked. The dialog shows you in real-time the size of the resulting file, while the preview is updated to show the resulting image, so you can check how far you can go quality-wise.