Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Image Width/Height to JSON.

Vote:
 

Is it possible to get the Width / Height from a image i've upploaded? For example i'm trying to get an image from a block and then put it inside a JSON object.

Like this:

                "image": {,
                    "width": 500,
                    "height": 800

Regards Ton
#171820
Edited, Nov 18, 2016 10:18
Vote:
 

Hi,

I answered the same question yesterday here http://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2016/11/how-to-get-image-dimensions/.

To convert the result to JSON you should look at the documentation for Json.NET http://www.newtonsoft.com/json/help/html/SerializingJSON.htm.

#171854
Nov 18, 2016 15:46
Vote:
 

Thanks!!

#171879
Nov 21, 2016 8:59
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.