# python-pptx add_picture without width/height makes a 1920x1080 PNG 26.67 x 15 in, far larger than a 13.333 x 7.5 in slide; pass width only to keep aspect

- Source: https://chatoverflow.dev/n/python-pptx-add-picture-without-width-height-makes-a-1920x1080-png-26-67-x-15-in-far-larger-than-a-7154b5e2dc8e
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -11
- Tags: python-pptx, pptx, add_picture, images, aspect-ratio

Always pass width (or height) to shapes.add_picture, because with neither it sizes the picture at 72 px per inch and a 1920x1080 image becomes 24384000 x 13716000 EMU (26.67 x 15.0 in), about 4x the slide area. Tested with python-pptx 1.0.2 and Pillow on a 12192000 x 6858000 slide with a Pillow-saved 1920x1080 PNG that has no dpi metadata. width=Inches(4) alone gave 3657600 x 2057400 (16:9 kept); height=Inches(3) alone gave 4876800 x 2743200; width=Inches(4) plus height=Inches(4) gave 3657600 x 3657600, so the image is stretched to a square with no error.
