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 4613400
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:32:35+00:00 2026-05-22T01:32:35+00:00

So this will no doubt come as a stupid question from an ignorant person,

  • 0

So this will no doubt come as a stupid question from an ignorant person, but I was wondering if there is any easy way out there of resizing an image BEFORE a user downloads it?

I am pulling in images from a 3rd party database, which I have no control over. I’m also not allowed to cache anything from it under their T&C.

They give a few different sizes for each image. But I am ending up resizing half of them on my pages with CSS.

So I was wondering if maybe using php or javascript or something! (I really have no clue do I), I could resize these images before my users waste time downloading much bigger versions.

The only reason I ask really, is that I know the Manchester United website kind of does it (with the aid of a piece of Adobe stuff I think), so I thought that maybe there might be something out there that anyone could use?

http://www.manutd.com/en/News-And-Features/Football-News/2011/May/Sir-Alex-Blackburn-reaction.aspx

http://www.manutd.com/~/media/64B766EE4A37488AA65DC7B08E5ABC1B.ashx?h=179&la=ar-SA&w=480&rgn=0,78,1200,524
-> 18kb compared to 160kb -> http://www.manutd.com/~/media/64B766EE4A37488AA65DC7B08E5ABC1B.ashx

(obviously I don’t want the cropping technique)

  • 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-22T01:32:36+00:00Added an answer on May 22, 2026 at 1:32 am

    If the images are coming from a server you don’t control, the short answer is NO. You can’t resize an image until you’ve downloaded it. Without caching a resized version, you are at the mercy of the 3rd party server. Unless you use a server side proxy program, yet this is probably more trouble than it is worth.

    Yet as I’ve pointed out in the comments, http://www.manutd.com will resize their images for you. In the link h=height, w=width and rgn=region (left,top,right,bottom)

    http://www.manutd.com/~/media/64B766EE4A37488AA65DC7B08E5ABC1B.ashx?h=80&la=ar-SA&w=120&rgn=0,0,1200,800

    You only need the h and the w. If your h and w don’t match the aspect of the image it will crop rather than skew. look at both of these. The image is 1200×800 aspect ratio 3×2

    w=240, h=160 3×2 (whole image)

    http://www.manutd.com/~/media/64B766EE4A37488AA65DC7B08E5ABC1B.ashx?w=240&h=160

    w=160, h=160 1×1 (cropped)

    http://www.manutd.com/~/media/64B766EE4A37488AA65DC7B08E5ABC1B.ashx?w=160&h=160

    After I’ve played with it more, you can get by with just the width(w), and I’m assuming this also applies to just the height. (EDIT: yes it does)

    Whole image, 480px wide…

    http://www.manutd.com/~/media/64B766EE4A37488AA65DC7B08E5ABC1B.ashx?w=480

    MORE EDITING: Understand, any time you see a ‘?’ in a url, you are requesting a page from a program, and the stuff after the ‘?’ are parameters for the program, and ‘&’ seperates the parameters. The server at manutd.com is using a program to resize their images, just like a proxy program would resize images for you. If you did resort to a proxy program, if it was a decent one, it would take a link like http://YourServer.host/proxyProgram.php?img=imageHost.org/imageName.jpg&w=240&h=160 given a link such as that there are all sorts of server side solutions to resize the image.

    Yet without a cache there is the possibility that you will resize the same image many times, and just the thought of that turns me off.

    I’m gonna quit editing now!

    Have fun!

    Skip

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

Sidebar

Related Questions

This will probably be obvious but I can't find the best way. I want
This will be probable quite odd question. But i thought I will give it
This will probably be a bot of a waffly question but ill try my
This will appear to a duplicate question but please consider this. I am doing
This will be implemented in Javascript (jQuery) but I suppose the method could be
This will be a bit subjective, I'm afraid, but I'd value the advice of
This will probably be just another unsolved thread but i'll fill in some info
This will be my first iOS app with any bit of complexity. I'd like
I am almost sure that this is not possible, but I'm wondering if someone
I don't come here for help often but I am pretty frustrated by this

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.