Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 568863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:14:01+00:00 2026-05-13T13:14:01+00:00

So I run a webgame over at http://ninjawars.net Displaying externally hosted images I want

  • 0

So I run a webgame over at http://ninjawars.net

Displaying externally hosted images

I want to provide embeddable images that aren’t avatars (I’m aware of and already using the great service of gravatar, but these images won’t be tied to any email), this is because I’ve found hosting your own uploaded images to often be a pain, and other people are already doing it better, so to speak.

Preventing excesses for external file sizes

However, this somewhat takes the control over the image size away. Using a simple link, this would allow the user to upload some large file size, and though it would be displayed with a certain display size in the css, it could force some silly long load time.

One way: Constraining the url

So I expect to need to limit the url parameters somewhat once they’re input by a user, limiting the options to certain image hosting services.
My initial thought with this is to require fixed sections of the url, a form that displays:

[http://flickr.com/photos/%5D [ put in the rest of your photo url here ] [/sizes/sq/]

So it’d limit the image to being hosted on flickr, and to a certain url that presumably sets the size on flickr, possibly with some back-end PHP processing that would strip any duplicate instances of the first and last parts of the url so that people can just post in the full url and have it work.

Better alternatives?

So the question is, is this a silly way to do it? Are there better javascript or php solutions already out there? How should I externally host images while still exerting some semblance of control? Or is this amount of control paranoid and not really necessary?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:14:02+00:00Added an answer on May 13, 2026 at 1:14 pm

    Use HTTP “HEAD” request to get file size w/o downloading it.
    response field “Content-Length”.
    Checking it in php or in js(ajax)… I would prefer js, cause it remove load from server to clients.
    Also, according to HTTP 1.1 no more connection should be used from one user-agent. And many users of your server could result in many simultaneous connections from your server to image hosting server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php application ( http://github.com/tchalvak/ninjawars ), essentially a php-based webgame that I
I run multiple webpages that I have programming in .net. I am looking at
Duplicate: Run .NET exe in linux Hello, Is it possible to make my existing
I run an ASP.NET application on IIS 6.0. Usually I have compression turned on
I run a SaaS that allows free trials. Basically if you register you get
I run through this Making a Cookbook tutorial (http://javascriptmvc.com/docs.html#&who=getstarted) Since I work with rails
I run a fairly active student blog that uses this event calendar plugin to
I run a wordpress blog. I want my blog to be available only for
I run the simple examples in the android dev site of tab widget: http://developer.android.com/resources/tutorials/views/hello-tabwidget.html
At run time I want to dynamically build grid columns (or another display layout)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.