M Sach
M Sach

Reputation: 34424

Image in email signature?

I need to store the image with email signature which can be sent to any email server like gmail,yahoo and etc . For this, I am planning to convert image to base64string first and then make the image tag out of it and store it with image signature body in database. Now wherever user sends the mail, his signature (signature body + image tag) will go with email. This way most of the email clients can display the image inline with signature.

To me this approach looks Ok, but one factor to consider for this, with base 64 string, image body will take lot of space in database column. Would like to know is this good way to go?

Upvotes: 0

Views: 2553

Answers (1)

Tim M.
Tim M.

Reputation: 54359

If the image is small enough to send via email, then it is small enough to store in any database as text/binary data. Presumably (hopefully) you only intend to add a single small, reasonably-optimized image that is at most 5-10KB in size.

See also: https://stackoverflow.com/a/9110164/453277 for an alternative method of including an image-based signature.

Upvotes: 2

Related Questions