Consider image size IDs when overriding the default image size (see #7470)