sarahjschultz / kittengif

Kitten GIFs for Emergencies
0 stars 1 forks source link

Kittens too big sometimes, investigate S3 integration #3

Closed carlwiedemann closed 7 years ago

carlwiedemann commented 7 years ago

Did a recent kitten refresh and the filesizes pushed us over the Heroku slug limit of 300MB).

I made some changes to use lower res images, which I think should suffice for now.

In short, many .webp files are quite large (>1MB).

We could improve the querying script to only download files that are under a given size.

Long-term the better solution would be to use proper asset management, i.e. https://devcenter.heroku.com/articles/s3

sarahjschultz commented 7 years ago

I am concerned about dropping res, because the GIFs come in as pretty low-res as-is. I don't have a better idea right now, but I will think about it.

sarahjschultz commented 7 years ago

ps: Thanks for the regular refreshing! 🐱

carlwiedemann commented 7 years ago

ps: Thanks for the regular refreshing! 🐱

What drove this initially was that some of the images weren't super child appropriate and rumor has it that our site is hip with the kiddos so I added the rating=g param to the Giphy query prior to regen.

I am concerned about dropping res, because the GIFs come in as pretty low-res as-is. I don't have a better idea right now, but I will think about it.

Yeah. Sans S3, the options to proceed are some combination of the following:

  1. Keep generation script as-is (i.e. no size filtering) and use the "fixed_width" resolution. (This is the current status)
  2. Improve generation script to only download large resolution gifs that are under a given filesize. The tradeoff here is shorter loop duration. I think there is also no guarantee that any image we download hasn't been downsampled as part of authorship (i.e. original capture resolution is 200x100 but has been enlarged to 400x200 in the final format).
  3. Reduce the number of kittens overall. 😿

I think the S3 free tier is worth exploring https://aws.amazon.com/s3/pricing/ before we get too popular. 📈 😎

carlwiedemann commented 7 years ago

Closing this in favor of https://github.com/sarahjschultz/kittengif/issues/5