Made the image in a fig panel resize to fit the div container. This is especially useful when the image's resolution is too big