Is it possible to include background images with a plugin?

(Simon Cossar) #1

I am trying to include a background image sprite sheet with a plugin. Is this possible? Are there any examples of plugins that are doing this?

How do I register a public asset in a plugin?
(Sam Saffron) #2

emoji used to be a plugin and used to ship image assets, maybe dig that up from source control for an example?

(Simon Cossar) #3

Here’s an example of how to do it:

Adding images to a plugin in the public/images directory will make them available on the server in /plugins/plugin_name/images/

(Bas van Leeuwen) #4

Be advised that plugin_name is the name you give in settings.yml and not the folder_name of your plugin; that tripped me up just now :slight_smile: