Skip to content

Lightbox doesn't show embedded Dropbox images #3031

@gnprice

Description

@gnprice

This is an issue whose symptoms look a lot like #2654, but the cause is a very close cousin of #2895. It's a bit of unfinished business that #2899 didn't yet fix.

To reproduce:

  • Paste into a message a Dropbox shared link that happens to be to (something with the filename extension of) an image, say .png.
  • In the mobile app, touch the image.
  • We show a blank lightbox.

What's happening is that the HTML for one of these looks like this (edited slightly for readability):

<div class="message_inline_image">
  <a href="https://www.dropbox.com/s/b7ke6alg3n2/foo.png?dl=0" target="_blank" title="foo.png">
    <img src="https://www.dropbox.com/s/b7ke6alg3n2/foo.png?dl=1">
  </a>
</div>

Note the two different URLs -- the img refers to the actual image, and the link refers to the Dropbox shared-link page around it. The lightbox should of course use the image.

Instead, we try to use the link as if it were an image, and of course that fails.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions