Maintaining Aspect Ratio for Images in PsychoPy When Resizing Screen

In my experiment, I want images to resize dynamically when the screen size changes. I understand that I should set the unit to height for this to work correctly. However, my images have different aspect ratios, and I want to maintain these ratios when resizing.

While I know I can specify the aspect ratio in my spreadsheet, I feel that setting all this data for every image seems inefficient, especially since PsychoPy inherently knows the width and height of each image.

Am I missing something? Is there a better approach than manually setting the aspect ratios in the CSV file? It would be cumbersome to remember to update them if any images are changed.

Thank you for your help!