pdxsherpa — 2013-07-10T00:03:11-04:00 — #1
I have a site that I am working on that has very large images.
what is the best way to preaload them?
ralphm — 2013-07-10T02:06:30-04:00 — #2
Make sure to optimize them first, in something like Photoshop > Save for Web. You shouldn't be offering up large images files on the web. They can have large dimensions without being large files. For example, the image could be 2000px x 2000px and yet be saved at a small file size (like 30–100kb) and still display nicely in a browser. If you are serving up images of more than 100–200kb, you are on the wrong track. So deal with this first before worrying about preloading.
pdxsherpa — 2013-07-10T10:01:58-04:00 — #3
I already did the photoshop>saveforweb.
the main sunrise pic is
when I go to save for web & devices, picked teh png-24 option, default is bicubic. size 100%...
is there anything else I could change to improve on this?
ralphm — 2013-07-10T10:26:09-04:00 — #4
The resulting file size is the important thing—but you left that detail out.
The main thing I'd change in those settings is the 100% ... assuming you are talking about "quality". Usually you can set it to 50–60% and not lose much qulaity, yet massively reduce the file size. Indeed, if you make the image huge (like, say, 2000px wide) but then squeeze it into a smaller on-screen area like 1000px width, you get sharp, retina quality display, even if you save the image at around 20% quality and at a very small file size.
pdxsherpa — 2013-07-10T10:56:35-04:00 — #5
Thank you for the advice will go try it out.
the end size should be big, the same? so it should be a large background. Did I misunderstand that?
system — 2013-07-10T12:35:04-04:00 — #6
The only time (usually) that it can help to preload an image is one that is shown on hover and there is a delay. In which case you can simply put the image at the bottom with display none. If the browser doesn't preload with display none css just position it off screen or other.
ralphm — 2013-07-10T18:44:46-04:00 — #7
The dimensions (width/height) are not the issue. The issue is file size ( in terms of kb etc.)
francky — 2013-07-10T21:24:32-04:00 — #8
In addition: you can have a look at the article Image saving with gif, png, jpg: which is the best format?
pdxsherpa — 2013-07-11T14:04:47-04:00 — #9
Thank you all.
will follow up on all the suggestions.
As it is the large images are for the backgrounds.
dresden_phoenix — 2013-07-11T16:54:14-04:00 — #10
In ADDITION to OPTIMIZING your images, you should also consider your image deployment strategy.
- Is the image CONTENT? No, then could it be used as a CSS element BG
- If the image is a BG, is it tiling. if yes, have I created the SMALLEST tile unit for a seamless pattern?
- If it's NOT repeating, can the container be sized to the image? in which case you may benefit from using sprites ( many images in ONE file). a sprite file may or may not be lager than the sum of its parts, but the benefit of FEWER HTTP REQUESTS will make your site load far quicker.