Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a Tag Helper for rendering responsive images in Umbraco 11. I'd like to be able to read the value for maximum image width and height, which I can see is set as 5000 by default in both the appsettings-schema.json and /umbraco/config/appsettings-schema.json files:
"description": "Value for the maximum resize width",
"description": "Value for the maximum resize height",
I've seen the documentation on how to read configuration data in code but I'm not sure what to do to be able to read the image size values as they're set in the appsettings-schema file rather than the appsettings file. Is it just a case of replicating that part of the json object so it's in the main appsettings.json file, from where it will be readable?
(As a related question, out of curiosity, how would you override these values - would do you that in the appsettings-schema file or the appsettings file?)
Thanks for any clarification on this!
Think I figured it out! 😅
To override the values, it would be a case of modifying the appsettings.json file, like this:
...keep existing settings here but add the following...
Then to read those values in code, you'd follow the docs but instead of using GlobalSettings, use ImagingSettings.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted