access image properties in transformation

lawrence whittemore asked on December 6, 2018 21:00

Is there a way to access an image attachments properties? I've added a description to an attachment and want to get it to show in the transformation as a caption.

Recent Answers


Zach Perry answered on December 6, 2018 21:12

How are you getting the attachment for the transformation?

If you are getting the attachment as an attachment object, it would just be Attachment.AttachmentDescription :

{% CurrentDocument.Attachments[0].AttachmentDescription #%}

1 votesVote for this answer Mark as a Correct answer

Bradley O'Neill answered on December 7, 2018 08:13

I'm not sure how much control I have with the Media Gallery. For example, in the Repeater with Effect, I had this, along with a Content before and Content After. Again, this worked out nicely, until I had to change the number of items on the first row. I will look over the Media Library and see what I can figure out. Being New to Kentico, its taking a minute to figure out all the best methods to use.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.