For 20 logos, 10kb size, I would recommend storing them in the
database and caching them as they are rendered.
Unless you are using a distributed cache, though, I don't know how
uploading a new avatar on (say) host 1 and then clearing it from host
2's cache will work though. I would be tempted to
cache them for a maximum time as well and refresh them as needed.
I have one model in most of my apps that use images. It only has an
ID, image format, image size, and image data. I don't store avatars
with the user table, for instance. This image model is only used in
two cases: one, when rendering the HTML link info, and again when
rendering the actual image data. I don't fetch the image data when
finding the size.
If you have a local cache, you could write the image data when
retrieving the size as well, since it's pretty likely the request will