Skip to content

fix: changed alignment from middle to center#191

Open
dotmarn wants to merge 1 commit into
laravolt:masterfrom
dotmarn:invalid-alignment-value
Open

fix: changed alignment from middle to center#191
dotmarn wants to merge 1 commit into
laravolt:masterfrom
dotmarn:invalid-alignment-value

Conversation

@dotmarn

@dotmarn dotmarn commented Jun 11, 2026

Copy link
Copy Markdown

This PR addresses an issue with the latest release, v6.5.0, where Avatar::create('John Doe')->toBase64(); throws an invalid value for alignment error.

image

Result
image

@dotmarn dotmarn marked this pull request as ready for review June 11, 2026 13:24
@dotmarn dotmarn force-pushed the invalid-alignment-value branch from 68566a9 to d0aa335 Compare June 11, 2026 13:54
@adeiming

Copy link
Copy Markdown

An upvote for this PR. This completely fixes the InvalidArgumentException: Invalid value for alignment issue when running laravolt/avatar alongside Intervention Image v4.

The hardcoded 'middle' string is not present in Intervention v4's native Alignment Enum, throwing a native ValueError. Changing it to separate align('center') and valign('center') methods resolves the issue perfectly. Looking forward to seeing this merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants