简体   繁体   中英

Image hosting and HTML img links

For the past couple of wordpress websites I have created I have uploaded all the images I needed to photobucket, and then used the links from there to insert them into my HTML.

My question; is there a more stable and easier way to create links for images ? I would like to not have to upload all the images to photobucket or similar as this process is very time consuming and tedious.

thanks

James

If I understand what you're asking, you could just include them in the same directory where your webpages reside. When you include the images in the links, just supply the filename (Ex: "whatever.jpg") with no path. When you upload your pages, just upload the images at the same time and in the same location.

For example: <a href="http://www.linkurl.com"><img src="whatever.jpg" /></a>

Instead of (like you're probably doing now): <a href="http://www.linkurl.com"><img src="http://www.photobucket.com/whatever.jpg" /></a>

Or in Wordpress/PHP's Case (if pages are dynamically created, still use an absolute path): <a href="http://www.linkurl.com"><img src="http://www.hiswordpresswebsite.com/whatever.jpg" /></a> `

(Edited in response to first comment below)

I have tried doing this with multiple services and if this is how you want to get the job done, Dropbox would be the most suitable , provided you have the Public folder already activated else you may have to pay to activate it because it not free to new users.

Links for files placed in Dropbox public folder are generated automatically and easier to use immediately on email, forum, blogs etc.

If you have a file named as Image.jpg inside a folder called faces inside your DBs Public folder then the link is

https://dl.dropboxusercontent.com/u/111111111/faces/Image.jpg

where 111111111 will be some other number (constant for your account).

So if you know the file names of your images, you could simply go on placing them in the Public folder and give img src to

https://dl.dropboxusercontent.com/u/111111111/FOLDER/FILENAME.ext

NO COPYING OF LINK AND STUFF AT ALL! Plus you could get the Dropbox desktop client and sync those images from your Machine, so if at all the image changes (still having the same filename) you wouldn't have to bother with making updates to your HTML or even re-uploading the image manually. Bandwidth (20GB/day) shouldn't really be a problem if limited amount of users are going to visit the site.

Basically it's like using Dropbox as a CDN.

However if you DON'T wish to pay for an account with public folder, you will have to share photos the traditional way on DB then get the link, copy, paste and stuff but dropbox organizes all your links at one single place so its a bit easier.

您可以将图像托管到Google云端硬盘中的公用文件夹。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM