2 Answers
2

AES is a block cipher, it works on 16-byte (128-bit) blocks. AES, in and on itself, can't work with data smaller or bigger than 16 bytes. Smaller data needs to be padded until they're 16 bytes, and larger data needs to be split into 16-byte blocks (and, of course, padded when needed*)

Luckily, there are algorithms that help you achieve just that (work on data larger than the cipher's block size), they're called block cipher modes of operation. They describe how the process of encryption and decryption using the block cipher should be.

Important: If you're writing your own implementation of AES to encrypt actual data for personal and/or professional use, then STOP NOW! Instead, use well-vetted, time-tested, and famous libraries for that. However, if you're doing that for educational purposes, go ahead, have fun.

If you want to use AES for confidentiality (i.e. to keep the image secret), use any of the modes offered by your library, except ECB which is not secure. If you also want to protect the image's integrity (i.e. to detect if it's been modified), use an authenticated encryption mode.

* There's more to padding than just the need to get to the block size, but I won't get into that. Read more about it if you're interested.