What is the deal with the assets folder?

I’m trying to create a simple tutorial based on the meme-maker project from Thimble. Like all normal webpages, images should be placed in the project root and referenced simply by their filename in the code. However, when I upload an image, it automatically puts it in the ‘assets’ folder and then I need to copy some ridiculous long url and paste this into the html. Surely, there is another way? This is a deal-breaker for me using Glitch to teach simple web design.

1 Like

I think the reasoning behind images and I think audio and video is the same, is you only have around 200MB space within your container and I guess the thinking is to automatically upload large files into the CDN which would help with spreading the bandwidth and not filling up your container space. That being said it would be handy for some situations to override this setting with the understanding of the limits.

There are workarounds but may seem longer than necessary. If you go into the console you can use wget to retrieve files from an URI not so handy if the files are only on your hard drive.

You can also start your project from a github repository and have a work flow of adding the images to the github repository and then pull them into the project.

I hope it’s not a deal breaker for you, I have found glitch to be my prefered online IDE even with it’s glitches’ and is improving over time. You can also use it with MSCode via a glitch extension, although I don’t think that helps with adding image files…

Hope this helps in some way.

Thanks for the reply tripy37 :slight_smile: The issue is that the activity requires that students upload a new file to a remix of the project and then replace the image filename in the original project with their new one. So, simply replace ‘village.png’ with ‘disaster.png’. This activity was very successful in Thimble and is aimed at Year 6 (9 year olds) for secondary Intake day so it can’t be too challenging.

I remixed a project that I use as a CDN so I can customize URLs and add basically anything I want. The only exception is I have to upload it manually for secret files. Here is an image I uploaded. https://cdn.cheesycorp.tk/img/CheesyTech.png

Hey @computinginschools,

If you still prefer uploading files to the project root, then this post tells you how:

By default images are uploaded into the assets and into the CDN. There two workarounds to download file to the directory:

  1. You can make a repository on GitHub and put images in it. When you import it, Glitch would preserve all images in the directory.
  2. After you have uploaded the image into assets, you can open the project Terminal and use wget to download it into the directory.

You can always run this:
wget cdn.glitch.com/yourimg
refresh
And then rename the image what you want it to be. It will be at the root.