Resizing an image

Width or Height

Original image:

Giving only width

                  <img src="">

Giving only height

                  <img src="">

Giving both

                  <img src="">

Image Quality

You can change image quality if you want, its 95 default
                  <img src="">


Resize and crop

We'll first resize to width - for portraits height - then, crop to wanted to height - for portraits width.

                  <img src="">

You can crop from topleft too

                  <img src="">

Retina Devices

You can add retina=1 parameter to the url.
                  <img src="">
This will send 2x image when needed, eg. if your browsers density per pixel ratio is 2
In order this to work, you need to insert this into your webpages.
                      <script type="text/javascript">
                        document.write('<scr' + 'ipt src="'+window.devicePixelRatio+'"></scr' + 'ipt>');

Non retina