Post #4230985
2026-05-07 00:27 UTC
base issue:
we have a mobile share dialog experiment that takes the page summary, or a selected quote, combined with the page image (same one the mobile app would use for its hero image), plus license info & branding, which renders into a PNG which gets either downloaded or shared out via the OS to social apps
the background color and text color are keyed off the image
we must load the image from upload.wikimedia.org (hello CORS)
patch tried to optimize by reusing a thumbnail
Replies (1)
-
@bvibber@wikis.world 2026-05-07 00:29
problem is the thumbnails don't have `crossorigin=anonymous` set on them so we can't actually use them to paint to a and extract the bits to calculate the color so we either have to give up the optimization of reusing a possibly-already-loaded thumbnail to initialize the color faster or we have to change the thumbnail's HTML output on the PHP end to ensure it loads in CORS mode i wasn't sure what to do as a quick fix here so we'll figure it out tonight or tomorrow ;)