Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Co-Author Avatar block for feature parity with Author Avatar block #1022

Open
douglas-johnson opened this issue Feb 12, 2024 · 0 comments

Comments

@douglas-johnson
Copy link
Contributor

While reviewing #997 @laurelfulford pointed out that the Co-Author Avatar block's image dimension controls don't match the controls for the core Author Avatar block in WordPress 6.4 and above. #997 (comment)

Between WordPress 6.3 and 6.4 the Avatar blocks were upgraded to use a range control instead of just the sizes defined in rest_get_avatar_sizes.

This works for Gravatar because the width is defined by a query parameter in the URL. The same does not apply as easily for images uploaded to the WordPress media library because the sizes can be limited to those determined by theme and plugin code.

Since a Co-Author could have either a Gravatar or a featured image that was uploaded to the media library, some work needs to be done to support both use cases in the Co-Author Avatar block.

In #997 there are separate blocks for Co-Author Avatar and a Co-Author Image. I did this to make a clear distinction between Avatar which supports Gravatar and is always square as opposed to Image which supports the media library and has the full dimension controls.

If we have to support all the dimension controls in both blocks, it might make sense to make them into a single block and make Gravatar support an option that is true by default.

@douglas-johnson douglas-johnson changed the title Update Co-Author Avatar block for feature parity with User Avatar block Update Co-Author Avatar block for feature parity with Author Avatar block Feb 12, 2024
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

No branches or pull requests

1 participant