PDA

View Full Version : speed up image



benslayton
05-25-2006, 07:23 PM
Is there any way to speed up image loading???:)

djr33
05-25-2006, 07:38 PM
No. You can't speed up loading... connections transfer ones and zeros... bytes.... megabytes... images.
So... that's that.

You could make it a smaller file, though.

Twey
05-25-2006, 07:47 PM
You can use something like gzip compression from your server.

benslayton
05-25-2006, 07:47 PM
well i have an image that is 4000 x 4000 how do i get it to load faster

benslayton
05-25-2006, 07:48 PM
You can use something like gzip compression from your server.
Let Me google that...

djr33
05-25-2006, 07:55 PM
Is that really worth it?

The data still needs to be sent... does every browser have compatibility for that?

benslayton
05-25-2006, 08:05 PM
Is that really worth it?
Is what really worth it? the gzip?
Or my image question?

Twey
05-25-2006, 08:45 PM
All recent browsers support gzip encoding. It's used quite transparently on many sites.

benslayton
05-25-2006, 08:49 PM
what if I put the image in Flash??? could that help any?

Twey
05-25-2006, 08:50 PM
Nope.
Only way to do it is to compress it somehow -- JPEG, gzip, whatever.

benslayton
05-25-2006, 08:55 PM
SO which way is better between gzip/jpeg

Quality ?
loading time ?

Twey
05-25-2006, 09:07 PM
gzip requires you have access to your server's config.
JPEG will lose quality.

benslayton
05-25-2006, 09:13 PM
well I cant access my servers config, and I def. cant lose quality

Twey
05-25-2006, 09:20 PM
You can't speed it up then, really :)

benslayton
05-25-2006, 09:24 PM
not even with flash?:confused:

Twey
05-25-2006, 09:27 PM
Flash is faster to load than bitmap images because it uses a vector format. If you can create your image from scratch in Flash, that'll be far more efficient. If, however, you just embed a bitmap into a Flash file, you'll actually be adding size to the file.

djr33
05-26-2006, 05:49 AM
Bytes take time to send. Get over trying to speed that up.

the ONLY way to change it is to lower the number of bytes.

that's called compressing.


there are two methods, lossy and lossless.

Lossless is basically zipping it... see above.

lossy is based on the art of lowering filesize while retaining as much of the original quality as possible... you can certainly get like 1/2 the quality at 1/4 the size, if not much better.


Just deal with lower quality... try it out in photoshop or whatever graphics app you have. A jpg at 30% quality looks great, usually. And it's a much smaller file.


Anyway... get over thoughts of trying to speed up loading a set amount of data... the only thing you can do is lower the amount of data.




Edit: slight tangent...
Twey, what's the positive and negative stuff for gzip?
How does one set that up? does it work for the whole site or just a single file?
and... is it really compatible?
saves enough time?
sounds interesting...

benslayton
05-26-2006, 11:19 AM
I went ahead and exported the image into flash. Fix what I needed.

Thanks

Twey
05-26-2006, 11:29 AM
Twey, what's the positive and negative stuff for gzip?
How does one set that up? does it work for the whole site or just a single file?
and... is it really compatible?
saves enough time?Install and enable mod_gzip, in the same manner you installed Apache. Use a LoadModule directive in the config file to enable it. It works for the whole site.
It's part of the IETF standard, so all browsers should implement it. I haven't come across one that doesn't.
Filesize reductions of 90% or more are possible, but you'll tend to get less deflation of already-compressed filetypes such as GIF, PNG, JPG.
It reduces the network load, but increases the CPU load on both the server and the client, as they have gzip/gunzip it at either end.