External onclick handler for scaling images.