Anton Keller Posted October 20, 2021 Share Posted October 20, 2021 Hi Magnus, I would like to include images in my mod, how do I do the following: 1 include an image like this, 2 include images from a database (blob) 3 include local images, local to the mod (where the image is linked via an address from db) Regards, Anton. Link to comment Share on other sites More sharing options...
Erik Brandin 2 Posted October 21, 2021 Share Posted October 21, 2021 Hi Anton, This section in our FAQ talkst about ways to include resources. It talks about script and stylesheets, but images follow the same pattern. So, if you want to include an image from an external resource this needs to be specified in the manifest. Your example would need this entry in the mod manifest file: "externalResources": ["https://microsoft.com/"] Images added to the mod itself needs to be added to the files entry of the manifest, and the src attribute should be relative, just like including custom scripts and stylesheets. When it comes to retriving dynamical data from a database this is currently only possible without using CORS. So it is not possible to use Ajax reuests to fetch an image in binary form. Regards Erik Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now