Page MenuHomePhabricator

[SPIKE] Send an image thumbnail to the logo detection service within Upload Wizard
Open, Needs TriagePublic

Description

In T363506: Pass image objects to the logo detection service we discussed options to prevent the service from downloading an uploaded image via a stash URL, which has limitations in terms of security (see T362749#9785333), privacy (see T362749#9785550, T362749#9786161), and likely performance.

The agreed solution is to send a thumbnail image object to the logo detection service within Upload Wizard: investigate its feasibility.

Steps

  • investigate if we can access Thumbor's results of stashed images from MediaWiki - SpecialUploadStash has an outputThumbFromStash method, which seems to indicate that it's possible
  • the thumbnail should be 224x224 pixels
  • decide the image serialization format, e.g., binary or base64
  • inform ML in T363506#9794241
  • set up an internal API endpoint in Upload Wizard that
    • accesses the stashed thumbnail
    • sends it to a LiftWing internal endpoint - the logo detection service isn't exposed yet, so it might be worth trying with an available one
    • includes a content length request header

Event Timeline

mfossati renamed this task from [SPIKE] Resize an image file to 224x224 pixels within Upload Wizard to [SPIKE] Send an image thumbnail to the logo detection service within Upload Wizard.May 14 2024, 2:20 PM
mfossati updated the task description. (Show Details)

Change #1036637 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/UploadWizard@master] [POC] API endpoint to submit stashed thumb to liftwing

https://gerrit.wikimedia.org/r/1036637