Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reduce size of Large(ish) image for web page download

I have a site which uses a large image as a background. It's a jpeg that's 134KB in size - I can't really get it below that so far. I have saved it for web in photoshop on low quality jpeg setting. It's dimensions are: 1920 x 1028.

How can I reduce the size further?

Could I resize it extremely small and resize it with width and height attributes in the image tag - as long as the aspect ratio is the same?

Its killing my page speed. Please help - any advice welcome.

like image 877
David Avatar asked Dec 21 '10 22:12

David


People also ask

How do I reduce the size of a photo for Web?

To make a picture file size smaller, you first need to resize the images on your computer before uploading them to your website. Then, you can: Use Optimole to optimize images, with the bonus of automated optimization for all future images. Use an online tool like TinyPNG or TinyJPG to manually compress images.


3 Answers

Without knowing the picture I can provide different ways:

1) If you dont want your picture to be too prominent in the background, try to blur it (could be a lot - depending on the picture!) -> then you can us a higher compression rate without seeing the artifacts too much.

2) depending on your picture, try to reduce it to certain color-ranges (that you use a max. amount of colors) -> with this method you might end up using a .png or gif file, photoshop will show you what is best.

One last thought: As this is you BACKGROUND image, try to keep it in 'the back' - this way you can try and alter (destroy) the image in a way to reduce colors! On the other hand, try using smaller pictures (800x600) and let css scale them, again - depending on your intention.

I use 1280x1024px bg-images at about 55Kb.

hope this helps.

like image 147
Rockbot Avatar answered Oct 21 '22 13:10

Rockbot


Try smushing it http://www.smushit.com/ysmush.it/

like image 27
Matt Asbury Avatar answered Oct 21 '22 13:10

Matt Asbury


Yes, you can use a smaller image. Your main options are

  • resize it on display (using something like <img src="xxx" height="200%" width="200%">)
  • tile it

If it is a uniform background (pattern or similar), tiling probably looks nicer, as scaling up the image will degrade its visual quality. If it is a picture, you'll have to scale it.

like image 1
sleske Avatar answered Oct 21 '22 12:10

sleske