Free Trial
10 days, no credit_card

<< More Tutorials

How to use rethumb in Javascript?

To use rethumb in Javascript try the following code:

<html>
    <head>
        <script language = "JavaScript">
        window.onload = function()
        {
            var newImage = new Image;
            newImage.onload = function() {
                document.getElementById("img1").src = this.src;
            }

            newImage.src = "http://api.rethumb.com/v1/width/100/http://factor45.org/images/beach.jpg";
        }
        </script>
    </head>

    <body>
        <img id="img1">
    </body>
</html>

Start using this example now

Use the following commands to get started:

$ git clone https://github.com/rethumb/rethumb-javascript-examples.git
$ cd rethumb-javascript-examples
$ open generic.html

More examples using Javascript