codex - 💡(How to fix) Fix Built-in image_gen is missing basic image controls like transparent background, size, quality, and masks [3 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#18944Fetched 2026-04-23 07:32:57
View on GitHub
Comments
3
Participants
4
Timeline
9
Reactions
1
Timeline (top)
commented ×3labeled ×3cross-referenced ×2closed ×1

Root Cause

The built-in tool is useful, but right now it feels too limited for real asset work.

A few common cases are hard to do reliably without these controls:

  • generating a real transparent-background PNG
  • choosing the output size / aspect ratio
  • doing masked edits
  • staying inside the subscription-based Codex flow instead of falling back to API-key-based workflows
RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

Codex CLI / Codex App with the built-in image_gen tool

What feature would you like to see?

What feature would you like to see?

I’d like the built-in image_gen tool to expose the basic image-generation controls that already exist in the image API / CLI fallback, especially:

  • background (transparent / opaque / auto)
  • size
  • quality
  • n
  • mask
  • input_fidelity

Why this matters

The built-in tool is useful, but right now it feels too limited for real asset work.

A few common cases are hard to do reliably without these controls:

  • generating a real transparent-background PNG
  • choosing the output size / aspect ratio
  • doing masked edits
  • staying inside the subscription-based Codex flow instead of falling back to API-key-based workflows

What I ran into

I tested the built-in image_gen tool with prompts like:

  • background: transparent
  • transparent background

The image looked like it had a transparent-style background, but the saved file was still a normal RGB PNG with no alpha channel.

So in practice, prompt wording alone does not seem to be enough when you need actual transparency.

Why I think this is missing in the built-in path

From the public Codex repo, the built-in image_generation tool appears to expose only

Relevant files:

  • codex-rs/tools/src/tool_spec.rs
  • codex-rs/tools/src/tool_registry_plan.rs
  • codex-rs/skills/src/assets/samples/imagegen/references/image-api.md

What I’d expect

If the built-in image tool is meant to be used for real image generation and editing, it should expose the main controls needed for that work, especially:

  • transparency
  • output dimensions
  • quality
  • masks
  • edit fidelity

The biggest one for me is background=transparent, because that is hard to replace with prompt wording.

Additional context

Related issues / discussions:

  • #8758
  • #14895
  • Discussion #592

Additional information

No response

extent analysis

TL;DR

The built-in image_gen tool in Codex CLI/App may require additional configuration or API updates to expose necessary image-generation controls, such as background transparency.

Guidance

  • Review the tool_spec.rs and tool_registry_plan.rs files in the Codex repository to understand the current implementation of the image_gen tool and potential areas for modification.
  • Investigate the image-api.md documentation to see if there are any existing APIs or parameters that can be leveraged to achieve the desired image-generation controls.
  • Consider submitting a feature request or pull request to the Codex repository to add support for the requested controls, such as background, size, quality, n, mask, and input_fidelity.
  • Look into the related issues and discussions (#8758, #14895, Discussion #592) for potential workarounds or insights into the current limitations of the image_gen tool.

Example

No code snippet is provided as the issue does not contain sufficient technical details to create a concrete example.

Notes

The solution may require updates to the Codex API or the image_gen tool, which could involve significant development and testing efforts. Additionally, the issue may be related to the specific implementation of the image_gen tool in the Codex CLI/App, and the solution may vary depending on the underlying technology stack.

Recommendation

Apply workaround: Utilize the existing image API or CLI fallback to achieve the desired image-generation controls until the built-in image_gen tool is updated to support these features.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Built-in image_gen is missing basic image controls like transparent background, size, quality, and masks [3 comments, 4 participants]