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>