Clearing space
Spent the past two days developing a system to save performer images to the ComFest server rather than relying on the links provided by the performer. Jared was gathering image information and supplying it to the google sheet where the acts are approved. It seemed most of the links were facebook and it seems like the links have a time limit to them. I'm not sure how long they last, but last year I noticed the images were no longer populating in the Web App when I checked it a few months after the festival. Jared was running into issues where he could see the image during the festival but other people could not, probably due to caching.
There is one advantage to the current system. Other servers bear the load.
So we have the link to the image stored in a text string. I've passed that string off to the PWA as well as the new schedule plugin I built for the wordpress website. The images are whatever size was uploaded. Anything from a couple hundred pixels in width to a couple thousand.
The new system takes those links and then copies a 400pixel and 100pixel image onto our server with the median size being 17Kb and 2Kb. On the wordpress site we're using a 100px square for the image. Currently they average 80Kb in size. Changing to our hosted icons leads to a 97% reduction in size! We should reduce a 18Mb load to 440Kb.
I ran into some issues while deploying it today. I added TimeDate fields to the table to hold information on when the image was successfully downloaded, and last changed. I used an if conditional to determine whether the file saved to the DB needed to be changed. It worked in my dev environment but failed when I ran it in production. I believe it has something to do with the way I iterated through changes while developing. I ended up scrapping the time based conditional that limited the number of times a file would attempt to update to once a day.
Testing. Testing would fix this problem. Or limit its chances of causing destructive problems.
Anyway. I have the back end in place. The images are saving and the api is serving their location. I now have to implement them in the PWA and in the wordpress plugin.