Background Magnifier

The Magnificent Background Magnifier script takes an image and stretches it so that it fills out the whole background of a website while keeping the aspect ratio of the image intact. This can be useful not only when you have an image where it's obvious when it's aspect ratio is messed up (e.g. a portrait or a house) but also if you want to keep the size of your image down and still have it stretch over the whole width of the website (hint: experiment with tiny images!). The script should be very easy to use, all you need is two JavaScript files and a background-image declaration in your CSS.

You can download the script (v1.0) and have a go at it. If you find errors or have an idea for future versions, feel free to contact me.

Examples

Development

If you want to contribute to this project, visit the project on github:

http://github.com/naehrstoff/magnificent-background-magnifier/