Problem/Motivation
With OpenAI as the image provider, Landscape and Portrait fail: the generator asks for 1792x1024 or 1024x1792, and gpt-image-1 models answer "Invalid size. Supported sizes are 1024x1024, 1024x1536, 1536x1024, and auto." The video generator fails on every press, since its default shape is Landscape.
The provider lists the sizes of all its image models together, DALL-E 3's included, and the generator picked the largest one of the shape.
Steps to reproduce
- Set OpenAI gpt-image-1-mini as the text to image default.
- Show the Size option to editors, pick Landscape, press Generate image.
Proposed resolution
Send the size the form names (1536x1024 for Landscape, 1024x1536 for Portrait) when the model lists it, and fall back to the largest listed size of that shape only when it does not.
Remaining tasks
- ✅ File an issue
- ✅ Addition/Change/Update/Fix
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support
- ➖ User Guide Documentation support
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ✅ Update Release Notes
- ✅ Release
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Landscape and Portrait send the size the form names, so gpt-image-1 models accept them.
AI-Generated: Yes
Issue fork ai_media-3634446
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
rajab natshah✅ Released ai_media-1.0.0-rc1