Jump to content

How do I include images in a mod


Anton Keller

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...