Autoadjust canvas and svg container to the image size