Add new properties on the existing media type "Image" (simple textstring properties will do). As soon as you upload a new image, those new properties will be available. Same as if you'd create the new media using your code.
Be aware that changing the structure of the existing media type "Image" will impact all images (don't have to supply values for all existing images though).
Could also create a new media type (copy from the existing one) and add the new properties there (in which case you don't change existing images in media section)
custom property for image media type
I want to save an image with set of data i.e ( image title, location of image, person who took the photo , ..so on)
I hope to save these data in image 'porpertycollection ' like follows:
is above method possible? if so how to create custom PropertyType. else how to store those values related to image.
Hi Salinda,
Add new properties on the existing media type "Image" (simple textstring properties will do). As soon as you upload a new image, those new properties will be available. Same as if you'd create the new media using your code.
Be aware that changing the structure of the existing media type "Image" will impact all images (don't have to supply values for all existing images though).
Could also create a new media type (copy from the existing one) and add the new properties there (in which case you don't change existing images in media section)
More info on creating new media types can be found here: https://our.umbraco.com/documentation/Getting-Started/Data/Creating-Media/#creating-a-media-type
--Dirk
Hi Dirk,
thank you for the idea. but my situation force me to store data related to image in umbraco backend.
and i have to extend mediaType programmatically
See https://our.umbraco.com/documentation/Reference/Management/Services/ContentTypeService/ on how to extend media type programmatically
--Dirk
is working on a reply...