This commit implements a new handling of image attachments. We follow