De-duplicate linked images via emails

When receiving post content via incoming email a new image is downloaded each time and stored.

Steps to reproduce

  • Setup email to be received by group in a shared inbox
  • you receive an email from PayPal links their logo: http://images.paypal.com/en_US/i/logo/logo_emailheader_113wx46h.gif
  • Discourse downloads said logo and keeps a copy.
  • Wait for micro-payments to roll in.
  • Lucky you now receive 1000 emails in a single day from PayPal.

Expected

  • a single copy of the logo to be stored on disk.

Actual

  • Lucky you, you now have 1000+ copies of their logo.

Hmm I wonder if we should ignore images in staged emails. This makes it awfully hard for a support email with a screenshot to work, though… your thoughts @zogstrip?

Odd, the de-duplication really should be working for this, if not something is off (uploads are created and the uploads should be automatically de-duplicated). Not too keen of giving up on images here.

5 Likes