Working with images in attachements