Enable Image property on a digital twin

Negosek de Oliveira, Victor Hugo 26 Reputation points
2022-11-02T10:13:10.227+00:00

Hello I am curently on a project where I need to store an Image on the Digital Twins, but as far as I know it is enabled just string, int and booleam propertys (not file).

Does anyone know how I coul assign and store this image to my Digital Twin ?

Azure Digital Twins
Azure Digital Twins
An Azure platform that is used to create digital representations of real-world things, places, business processes, and people.
231 questions
Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
278 questions
0 comments No comments
{count} votes

Accepted answer
  1. Matthijs van der Veer 4,376 Reputation points MVP
    2022-11-02T10:33:32.313+00:00

    For example, you could store your image in an Azure Storage Account, with blob storage. You can then include the URL of that blob in your twin as a string.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 33,051 Reputation points MVP
    2022-11-04T01:26:02.453+00:00

    Hello @Negosek de Oliveira, Victor Hugo ,

    you cannot store a byte array in a twin property, apart from the 32KB limitation in the size of a twin instance:

    256959-image.png

    I do not think a base64 encoded byte array (so it is turned into a string) will fit.

    With this in mind you could try the (blob storage) URL path, @Matthijs van der Veer suggests. Or you could just use a relative path (like just the file name or extended with some folder structure).

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.