download image code snippet