You do not need to edit every profile picture or generate a permanently circular image. A CSS rule can round WordPress avatar output wherever the matching selector appears, including comment lists and author areas.
Square
Little or no corner rounding.
Rounded rectangle
A fixed radius softens the corners.
Circle
A 50% radius on a square image.
Recommended CSS
For standard WordPress avatar images, begin with:
.avatar {
border-radius: 50%;
}
A percentage radius follows the element’s dimensions. When width and height are equal, 50% produces a circle. When they differ, the result is an ellipse.
A more resilient version
If the source image is not perfectly square or the theme applies unusual sizing, define a square display box and control how the image fills it:
img.avatar {
aspect-ratio: 1;
border-radius: 50%;
object-fit: cover;
}
Choose where to add the CSS
Customizer Additional CSS
Use Appearance > Customize > Additional CSS when the active theme exposes the Customizer.
Styles or Additional CSS
Use the Site Editor’s Styles controls, site-level Additional CSS, or block-specific CSS when those options are available.
Child-theme stylesheet
Use a child theme when the CSS belongs in source control or must ship with a theme customization.
The related TDWP guide, How to Add Custom CSS to Your WordPress Theme, explains these placement choices in more detail.
Apply and verify the change
Choose one safe CSS location
Avoid copying the same rule into the Customizer, Site Editor, child theme, and plugin. One maintained source is easier to troubleshoot.
Add the selector and property
Start with .avatar { border-radius: 50%; }. Save or publish the CSS.
Open several public locations
Check comments, author boxes, account areas, sidebar widgets, and any page that displays a Gravatar or profile image.
Inspect at multiple sizes
Review small comment avatars and larger author portraits on mobile and desktop. Confirm that no image is stretched or clipped incorrectly.
Clear only relevant caches
Purge the page, CSS, optimization, hosting, or CDN cache when the saved rule does not appear immediately.
Choose the correct selector scope
The broad .avatar selector intentionally affects every matching avatar. Narrow the selector when only one location should change.
| Goal | Possible selector | Notes |
|---|---|---|
| All standard avatars | .avatar |
Broadest option; test author, comment, widget, and account output. |
| Comment avatars only | .comment .avatar |
Depends on the theme’s comment markup. |
| Comment list only | .comment-list .avatar |
Useful when an author card should retain another shape. |
| Author box only | .author-box .avatar |
Replace .author-box with the actual theme class. |
| Specific avatar size | .avatar-96 |
Size classes can vary with the requested avatar dimensions. |
Find the actual avatar class
If the rule does not work, inspect the image rather than guessing. In current Chrome, Firefox, Edge, or Safari developer tools, right-click the image and choose an Inspect command. Review the image’s classes and the Styles or Computed panel.
WordPress’s avatar API produces an image element, but themes and plugins may alter the HTML, add wrappers, replace the avatar service, or output an entirely custom profile component.
When another rule overrides the radius
Open the browser inspector and look for a crossed-out border-radius declaration. That usually indicates a more specific selector, a later rule, inline styling, or an !important declaration.
.comment-list img.avatar {
border-radius: 50%;
}
Prefer a slightly more specific selector or correct source order before adding !important. Excessive specificity makes future theme changes harder to maintain.
Avatars that are clickable links
Rounding the image should not remove the link’s keyboard focus indicator. When an avatar is wrapped in a link, apply focus styling to the link rather than relying on an outline that may be clipped by the image.
.comment-author a:focus-visible {
border-radius: 50%;
outline: 3px solid currentColor;
outline-offset: 3px;
}
Preserved original 2014 CSS
.avatar {
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
}
Troubleshooting
The avatar is oval instead of circular
The rendered width and height are different. Use a square source or apply aspect-ratio: 1 and object-fit: cover to the image at the intended display size.
The rule affects too many profile images
Replace the broad .avatar selector with a context-specific selector such as .comment-list .avatar.
The CSS is saved but nothing changes
Inspect the public image, confirm the selector matches, review the cascade, and clear optimization or CDN caches. Also test while logged out because account and public templates can differ.
The image corners are still visible
A wrapper may have its own background, border, padding, or overflow behavior. Inspect both the image and its parent link or container.
Only some avatars are round
A plugin or theme may output different class names in comments, author boxes, profiles, and widgets. Add targeted selectors rather than one overly broad rule.
A theme update removed the styling
The CSS was probably added directly to a parent stylesheet or the active theme changed. Move it to Additional CSS, an appropriate Styles setting, or a child theme.
The avatar looks blurry
A small source image may be enlarged beyond its intended size. Avoid forcing a larger width and height than WordPress or the theme requested.
Test the final result
Comments
Check top-level comments, replies, deep threads, anonymous users, and default avatars.
Author areas
Review author boxes, archives, bylines, profile cards, and contributor widgets.
Responsive behavior
Verify the shape at phone, tablet, desktop, zoomed, and high-density display sizes.
Keyboard focus
Confirm linked avatars retain a visible, unclipped focus indicator.
Image quality
Check that cropping remains appropriate and faces or logos are not cut off.
Theme changes
Retest after theme, plugin, optimization, avatar-provider, or template updates.
What changed from the original tutorial
The original page recommended editing style.css, supplied three border-radius declarations, explained that WordPress normally adds an avatar class, preserved a DevTools inspection screenshot, and referred readers to a compatibility table and radius generator. The revised guide keeps the CSS and screenshot while recommending update-safe placement, modern unprefixed CSS, square-image handling, narrower selectors, accessibility, cache checks, and broader testing.
Article status
Archived discussion
The original page contained inactive comment and newsletter forms. They were removed so visitors are not asked to submit personal information to obsolete endpoints.