We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
RandallB
5 years agoExplorer | Level 3
Best Method for pulling images into webpage
Working in WordPress. I need to use the API to connect and loop thru and display images in a folder. How do I get the display-able image url? Everything I search tells me to use
get_temporary_li...
RandallB
5 years agoExplorer | Level 3
Using get_temporary_link, I get:
path_lower": "/tkc enterprise llc/projects/jobs/summit/pictures/cover-photo.jpg", "path_display": "/TKC Enterprise LLC/PROJECTS/Jobs/Summit/Pictures/cover-photo.JPG"
however I get 404 if I try those paths with dropbox domain.
How do I get a link of an image in a folder in dropbox using the API, that I can use in a webpage using the img tag?
Example: <img src="path/to/my/image/on/dropbox" />
?????
kylea
Dropbox Staff
5 years agoget_temporary_link returns both a path_lower and a link. The former is a relative path in the Dropbox filesystem; the later is the link you're looking for.
We do not recommend using get_temporary_link to render content. Temporary links do have associated bandwidth quota; exceeding it may result in blocking it.
The best way to pull in images for website display would be to generate thumbnails with the API and cache the results.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!