OriginProtocol / origin

Monorepo for our developer tools and decentralized marketplace application
https://www.originprotocol.com/developers
MIT License
652 stars 196 forks source link

Thumbnail Generation Service #2187

Open micahalcorn opened 5 years ago

micahalcorn commented 5 years ago

Build a service for generating various sizes of images that are added to listings (and profiles?) so that only the optimally-sized image is loaded on small screens, for example.

tomlinton commented 5 years ago

I think this is a duplicate of #947? I think we ended up deciding against this in the discussion there.

micahalcorn commented 5 years ago

Oh, okay, thanks. I misunderstood. 🙂

tomlinton commented 5 years ago

I don't think you did, it sounded like we wanted to revisit this from the conversation. I mostly wanted to point out the old discussion. :)

Lets leave this one open and close the other one.

nick commented 5 years ago

Could be worth considering this as a quick fix:

https://blog.cloudflare.com/announcing-cloudflare-image-resizing-simplifying-optimal-image-delivery/

Edit: I guess it's for premium customers only so maybe not

nick commented 5 years ago

I have just experimented with using https://github.com/willnorris/imageproxy which looks like a great solution for this due to its speed and caching flexibility. Took me 5 mins to set up locally and reduced image bandwidth on page 1 of shoporigin.com from 3.6Mb to 460k.

I think we can setup images.originprotocol.com and let the DApp use that to auto-resize and cache images. We could also put a CDN in front of that to further reduce image latency.

cc @franckc @mikeshultz

franckc commented 5 years ago

Cool. Yes, that seems like a nice image resizer http proxy. I'm sure it would help on low bandwidth connections. Like on mobile.

Though I bet currently our primary DApp performance bottleneck is not pulling images but rather the latency of our graphQL server...

nick commented 5 years ago

Yea agree GraphQL server is the biggest cause of latency. The main reason I looked at this again was to help fix #3570 but I think anything that can help reduce bandwidth would be helpful too.