takahe icon indicating copy to clipboard operation
takahe copied to clipboard

Download and cache profile icons/images locally

Open andrewgodwin opened this issue 2 years ago • 1 comments

We should probably do this for at least these images just to lessen the load on other servers. We can stash them in the same fields we use for locally uploaded images.

We should also think about how to expire and remove these after a certain amount of time where they've not been used.

andrewgodwin avatar Nov 27 '22 23:11 andrewgodwin

There should be a "Needs more JPEG" setting to aggressively downsample or a settable threshold where we let the host server deal with images that are too bloated to justify processing or caching.

manfre avatar Nov 28 '22 03:11 manfre

Mastodon has a timeout feature that keeps the retrieved images/content for x days.

preeefix avatar Dec 03 '22 03:12 preeefix

Another option would be making usage of proxing software like morty, like searx is doing. Caching of these content could be done via nginx or apache cache modules.

kromonos avatar Dec 04 '22 14:12 kromonos

I think our general approach might be, for remote images at least and maybe for profile pics, to just use a proxy model - build it into Takahē by default, but have it separable enough it can be pointed and run elsewhere.

andrewgodwin avatar Dec 04 '22 16:12 andrewgodwin