Images and other elements that aren't code or text files should be saved in the Assets section of the project editor.
To find assets:
- Open the project editor.
- On the left side of the page at the top of the file view, click Assets.
To add an asset:
- Go to Assets, then click UPLOAD AN ASSET or drag and drop asset files into the project editor.
You can get the URL of any of the files added to assets so that you can use it in your project code by:
- Clicking on the asset file, which will open a modal box containing the URL to copy.
- When you are done, click anywhere outside of the modal box.
- In addition to the disk space allotted to each project, there's an additional 512MB of storage space specifically for assets.
- The maximum file size per upload is limited to 256MB.
- When you upload a file to assets in the project editor, it's added to our CDN. Within the project, the asset is also added to a hidden file named, .glitch-assets. If you are a project member, it is possible to manually update this file to include files from other sources. If you delete a file from assets or .glitch-assets, it will be removed from the project, but it will not be removed from our CDN.
- If you would like an asset removed from the Glitch CDN, please send us a support request and provide the URLs for the assets that you want completely deleted. We're happy to help with this!
- Any files put into a project’s Assets area are technically public, even if the project code is set to private. Click here to learn more.