Instead of setting a width of 500px on “GridImage” try setting the width to “Auto” and then set a “max width” of 500px.