system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do two images with the same dimensions and file type have different file sizes?

Do some colours take up more space or something?
gpt
No, it's the relative mix of colours that do.

Have a look at this sequence of numbers.

1-1-1-1-1-1-1-1-1-1-1-1-1-12-12-12-12

You can describe that much faster as "13 ones and then four 12's". And your computer can save storage space in its memory by saving it in that way.

Now try that with

1-2-1-1-6-5-24-1-6-2-6-1-2-14-12-12-6

Even though the list of numbers is the same length, because the numbers are all mixed up and different, its not going to save much space if you group the few pairs of numbers there. So it takes more data to store the second stream of numbers in a computer.

Stored images work the same way. The computer 'compresses' them when it can to lump same-numbered colour together so it can be saved in a smaller space on the hard drive. The more an image is made out of fields of colour that are almost identical or have less complexity, the less space it can compress the image into by grouping like numbers and doing other things. 

So in the end, a simpler image with less colours such as a birthday cake with one candle in a dark room can take a lot less disk space than a same-resolution image of a sunny autumn forest that's blazing with all sorts of different coloured leaves, has branches and tree trunks and bushes, and so on.