Adding Max-Width and Height Properties for img to Dynamically Resize Images