function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mike Lee 12Mike Lee 12 

Linking images to custom object

Hello, new to Salesforce and was wondering how to tackle a issue that deals with images. I've created a custom object (called Shirt) which deals with a product to be sold. It has fields for things like name, description, etc...

I'd like to also include images with this object so when people look at a Shirt record will see all the images of this particular shirt.

Not sure if a custom object can hold a image field or if I need to handle this another way. 

Any ideas would be greatly appreciated.

Thanks,

​Mike
Best Answer chosen by Mike Lee 12
pconpcon
What I would do is to create a Text Area field on the object and the Base64Encode [1] the image and store it on the object.  Then you can just output it in a img or apex:image tag [2]

[1] http://salesforce.stackexchange.com/questions/36861/how-to-save-base64-image-data-as-salesforce-attachment
[2] http://stackoverflow.com/questions/16262098/displaying-a-base64-image-from-database-via-php