Page MenuHomePhabricator

make images from comments visible in email
Open, Needs TriagePublic


When pasting an image into a comment, the email renders something like F424: Screen Shot 2015-11-06 or {F424}.
Users with to see the content of the photo in their email.

We probably can't reasonably just attach the photo (That could end up big), but embedding <img> tag for a direct-download of the image might work.

For reference, GH uses the "Everyone with the link" security model (i.e., there's an no-security obfuscated link to the content). This might be a little extreme, but it gives users the behavior they like.

(Actually, this might already be possible using some combination of configuration I'm not thinking about).

Event Timeline

avivey raised the priority of this task from to Needs Triage.
avivey updated the task description. (Show Details)
avivey added projects: Mail, Remarkup.
avivey added a subscriber: avivey.
avivey added a project: Restricted Project.Dec 23 2015, 1:15 AM
avivey moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Dec 23 2015, 7:21 PM

We probably can't reasonably just attach the photo (That could end up big)

We might want to do this regardless of costs, for VPN issues...

Did this ever actually work? it looks like we're still embedding links:

pasted_file (127×363 px, 7 KB)

epriestley added a subscriber: epriestley.

I think this didn't actually get handled in T10262, but should be doable now.

PhabricatorObjectRemarkupRule->renderObjectEmbedForAnyMedia() currently calls renderObjectTagForMail() unconditionally when we're in HTML mail mode. This always renders a (F123: Xyz) element.

Shortest path here is to replace that with some new renderObjectEmbedForMail() which falls back to renderObjectTagForMail(), then override the new renderObjectEmbedForMail() in PhabricatorEmbedFileRemarkupRule and render an <img />. After T10262, there's no longer an issue around generating a (relatively) stable URI which can be referenced externally.

However, all the call paths here are kind of a mess and implementing this cleanly (that is, not just copy/pasting a big chunk of PhabricatorEmbedFileRemarkupRule) doesn't seem straightforward, so I think this one is going back on the pile for next time.