p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

OpenProcessing Thumbnails are Low Resolution

Open outofambit opened this issue 1 year ago • 2 comments

For the homepage, community, and sketches pages we use the sketch thumbnails generated by OpenProcessing. Unfortunately these images are 400 by 400px and I haven't been able to find anything higher res generated by them. Unfortunately these images don't look great on desktop screens with layout design and occasionally they break the layout. @limzykenneth @Qianqianye do you have any insight on how we might be able to get higher resolution images from them or if they can generate higher ones?

For reference, I'm using the following URL form to get a link to the image for a sketch:

https://openprocessing-usercontent.s3.amazonaws.com/thumbnails/visualThumbnail{SKETCHID}@2x.jpg, where {SKETCHID} is the id of the sketch returned by the API and in the sketch's url itself. I'm actually not sure if this is an official part of their API but its the only way we have to get thumbnails for sketches on OpenProcessing.

outofambit avatar Apr 10 '24 20:04 outofambit

Thanks @outofambit! I sent an email to Sinan from OpenProcessing about this.

Qianqianye avatar Apr 11 '24 04:04 Qianqianye

Not sure if this is a good idea or not but I whipped up a quick prototype to see how feasible it would be to grab our own screenshots of sketches via Puppeteer. @outofambit I put up what I have so far in https://github.com/bocoup/p5.js-website/pull/192, but the biggest drawback is probably just the lack of ability to manually pick a good frame to screenshot.

davepagurek avatar Apr 11 '24 16:04 davepagurek