Have you ever tried to embed a “public URL” Dropbox link in an <IMG> tag—as you might for a blog post, forum post, or any HTML file? If so, you’ve experienced the problem that Dropbox “public links” are not direct links to the image file itself, but rather to an interstitial page that frames the image and gives you options for downloading the file, etc. Not embeddable at all.
Here’s the solution:
After you copy the public Dropbox link to your clipboard, just change ?dl=0 to ?raw=1 at the end of the URL.
If you leave the link as ?dl=0, although it will look like a link to an image, it will really link to the interstitial non-embeddable Dropbox page that frames the image or invites people to signup for Dropbox.
For example, the screenshot you see above is in fact hosted on Dropbox like this:
<img src="https://www.dropbox.com/s/mn5smjgwtlbndqu/dropbox-dropdown.png?raw=1" />
If I had left the link as ?dl=0, although it would have looked like a link to an image, it would really have been the link to the interstitial non-embeddable Dropbox page that frames the image or invites people to signup for Dropbox.
Pro Tip
Did you know Dropbox will let you automatically share screen captures? Just look in your Dropbox settings / preferences:
On a Mac, type shift+command+4 to screen capture any portion of your screen. Dropbox will then automatically add the screen capture to your dropbox, and copy the Public Link to your clipboard. This puts you one step away from pasting the link (don’t forget the ?raw=1) into a forum post or email.
Thank you so so much for your instruction. Almost hopeless without finding your site
I was searching Google for a way to embed an image on Dropbox and arrived at your site. Thanks for this info. It worked like a charm.
Hello all,
some days ago photobucket stopped their 3rd parts image hosting service and I am looking for another provider.
I just came across this page and i understood that 3rd party image hosting with direct links in Dropbox.
In photobucket it was very convenient that the direct link was based on the filename. For example a picture with the name pic1 got the link http://i327.photobucket.com/albums/k467/USERNAME/pic1.jpg
So it was possible to know the direct link only by knowing the file name. This is possible with Dropbox?
I just tried Flickr and it was not possible 🙁
Thanks for your help
THANK YOU! THANK YOU! THANK YOU! I’m an 81 year old who has wasted a day after photobucket changed their policy.
Thank you! Still working a few years later!
thank you!
This work nice => ?dl=0 to ?dl=1
Canton, Thank you so much! I really appreciate you for this. 🙂
thumbs up. Thank you!!!
Merci !
image loading is slow from dropbox link than other links, how can we make it faster to load.
also it works with android Glide
Thank you so very much.
I was at my wits end trying to understand why the urls were not working
Regards
THANK YOU THANK YOU
thank you so much for this tip! i was so frustrated about trying to embed a dropbox image and thanks to your advice it is working now!
Gracias!!
thanks very much, this is extremely helpful!
such a pleasuring post. you saved my ass. 😉
Thank you for this!!
Thank you for the tip, this is exactly what I was looking for.
What about embedding a dropbox folder of images and show it as a gallery? Anyway I can use an iframe code for this? That’s what I’m looking to do!
Thanks a ton for your tip!!!!
You’re Amazing!! THANK YOU FOR SHARING!!!
Thank you. You saved my precious time!
Thank you! This worked for me today! It’s so hard to find an image host for eBay.
Great, thank you so much for this help!
Great, thank you so much for this help!