43

I've been considering image hosting services for a project but am starting to wonder if that's just too complicated for my target audience as they'd have to upload all their images to the hosting service and then "attach" the images to the CSS file using the links the hosting service provides them. While that's a fairly simple process for us developers, I'm thinking that might be a large barrier to getting user buy-in for this feature.

I could simplify by hosting and serving the images myself but I'm worried about potential scalability issues that could present which I don't have the hardware or bandwidth to handle at the present time.

My thought is that I could have users upload their images and CSS to the server in a single zip file to the web server which could then extract the files from the zip, push the images on to an image hosting service, programmatically get the corresponding URL from the service and update the CSS accordingly before attaching it to the user's display profile.

This approach could kill both birds with one stone, I wouldn't have to worry about the bandwidth issues caused by serving potentially large images on every profile request and the user doesn't have to go through the headache of needing to set up an account on an image hosting service.

Does anyone know of any image hosting services that I can programmatically integrate with that has good reliability and performance that could assist me with this conundrum?

Thanks in advance

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
BenAlabaster
  • 39,070
  • 21
  • 110
  • 151

5 Answers5

13

Review the Picasa Web Albums Data API:

If you've signed up for Google+ then photos up to 2048x2048 pixels and videos up to 15 minutes won't count towards your free storage.

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
Roberto Aloi
  • 30,570
  • 21
  • 75
  • 112
11

I used https://cloudinary.com/ and found it pretty neat!

Nishant
  • 12,529
  • 9
  • 59
  • 94
  • 1
    Still working. If someone needs a link to the specific section: https://cloudinary.com/documentation/upload_images#uploading_with_a_direct_call_to_the_api – ViruMax Jun 19 '19 at 08:19
8

You might consider Amazon CloudFront. I have not used that particular service, but I have used Amazon EC2 and S3 extensively and am quite happy.

UPDATE:

I recently used CloudFront for a video hosting project and found it quite simple to setup and use.

Eric J.
  • 147,927
  • 63
  • 340
  • 553
  • 2
    Interesting... just got a drive-by downvote on this 4 year old question with no comment stating just what might be wrong with it. – Eric J. Jan 26 '14 at 19:50
  • 7
    ...You're on 70k(!) and you bother to remark on one downvote? My goodness. I'm on 14k on my best SE site, and even I don't complain any more. – Engineer Apr 27 '14 at 18:31
  • 1
    @NickWiggill: If someone found a problem with this answer, they should share what that problem is. It's not a question of reputation. – Eric J. Apr 28 '14 at 06:15
  • ...And yet as the rules of site have it, nobody is under any *obligation* to. Just like numerous other flaws in the system, such as upvote leads on early answers, etc. etc. Call me a realist: It's not going to change. Some people simply _troll_, that's how they _roll_. P.S. Your answer looked fine to me, but it's probably the fact that you said "I have not used that particular service" that garnered the unwanted attention. – Engineer Apr 28 '14 at 07:12
  • @NickWiggill: No *obligation* certainly, but like the FAQ used to say `If you see misinformation, vote it down. Add comments indicating what, specifically, is wrong. Provide better answers of your own. Best of all edit and improve the existing questions and answers!` Words to live by. PS - Almost all answers got down-voted, without comment. – Eric J. Apr 28 '14 at 16:28
4

Check out Flickr's API:

http://www.flickr.com/services/api/

HiredMind
  • 1,827
  • 17
  • 27
  • 4
    Flickr is somewhat strict as it comes to commercial usage of their service and they will remove all your images once they discovery they are used to host images from a service that e.g. has ads. – kravietz Apr 30 '14 at 09:13
3

Imgur has an API. From the "Overview":

Imgur's API exposes the entire Imgur infrastructure via a standardized programmatic interface. Using Imgur's API, you can do just about anything you can do on imgur.com, while using your programming language of choice.

The Imgur API is a RESTful API based on HTTP requests and XML or JSON(P) responses. If you're familiar with the APIs of Twitter, Amazon's S3, del.icio.us, or a host of other web services, you'll feel right at home.

This version of the API, version 3, uses OAuth 2.0. This means that all requests will need to be encrypted and sent via SSL/TLS to https://. It also means that you need to register your application, even if you aren't allowing users to login.

Kenny Evitt
  • 9,291
  • 5
  • 65
  • 93
  • 3
    which is blocked in Turkey, so don't use it if you have too many users/visitors from turkey. – Gökhan Mete ERTÜRK Dec 29 '15 at 16:33
  • they also have it very unstable. very hard to auth and use with all the limits – Oleg Abrazhaev Jun 30 '21 at 09:32
  • 1
    @OlegAbrazhaev I never had any problems authorizing or staying within the limits. They do (now) have [pricing](https://rapidapi.com/imgur/api/imgur-9/pricing) for "commercial" API users, via a separate [RapidAPI](https://rapidapi.com/?site) 'meta-API', and that seems to include much larger limits. – Kenny Evitt Jun 30 '21 at 14:51
  • 1
    @KennyEvitt thank you for an answer. I have tried, it was not easy to use their Oauth to get a token with Postman. Then I managed and got a lot of 'Too many requests' errors, but I did just a few requests. In the end, I switched to simple ImgBB api for the uploads test, which was my goal. Actually, I would add ImgBB to the answers :). but this question is closed. for others: https://api.imgbb.com/ – Oleg Abrazhaev Jul 01 '21 at 15:32
  • 2
    @OlegAbrazhaev This other Stack Exchange site is specifically for software recommendations (including APIs): [Software Recommendations Stack Exchange](https://softwarerecs.stackexchange.com/) – Kenny Evitt Jul 02 '21 at 15:15