Skip to content

Instruct Simple Local Avatars to use Tachyon image resizing #744

@johnbillion

Description

@johnbillion

If a user avatar is requested of a size that Simple Local Avatars doesn't already know about, it'll instantiate a WP_Image_Editor instance, attempt to resize the image, save it to disk, and update the user meta value with the updated URL.

All of this should be unnecessary on an Altis site with Tachyon in use. The URL for any given avatar size should be provided by Tachyon with the appropriate URL query parameters for the request size.

Simple Local Avatars currently lacks the necessary filters to achieve this. I've opened a PR to add one to Simple Local Avatars.

I've opened this issue on this repo because it's the one that has 10up/simple-local-avatars as a dependency. The change itself should probably go into Tachyon.

Steps to reproduce

  1. Visit your user profile screen
  2. Upload an avatar
  3. Save your profile
  4. Reload the page
  5. Observe that a {image}-52x52.jpg file has been created and saved by Simple Local Avatar and used as your avatar image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions