How to restore the frontend product gallery dimensions in a third-party design theme after upgrading Magento from 2.1.x to 2.2.x?

Magento 2.1.x

05

Magento 2.2.x (images became smaller!)

06

Locate all product_page_image_medium declarations in etc/view.xml files of your design theme.
E.g.:

<image id="product_page_image_medium" type="image">
	<width>1000</width>
	<height>1320</height>
</image>

Duplicate these declarations with the product_page_image_medium_no_frame name (and add <frame>false</frame> inside the declarations). e.g.:

<image id="product_page_image_medium_no_frame" type="image">
	<width>1000</width>
	<height>1320</height>
	<frame>false</frame>
</image>

See also: