Skip to content

perf: optimize avatar from assets#464

Open
GerkinDev wants to merge 1 commit into
zzossig:masterfrom
GerkinDev:perf/avatar-size
Open

perf: optimize avatar from assets#464
GerkinDev wants to merge 1 commit into
zzossig:masterfrom
GerkinDev:perf/avatar-size

Conversation

@GerkinDev
Copy link
Copy Markdown

This refactor tries to mutualize avatar display & improve performance by resizing the avatar.

The new partial, partials/whoami/img-url, has 3 parameters:

  • size: the (required) width of the output image
  • urlSource: an (optional) url to an avatar to use without transforms
  • fileSource: an (optional) path to an asset or static file. If it's an asset, it is resized, otherwise, it is used as-is.

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.

1 participant