We have moved to Github. Please open tickets there.

Opened 2 years ago

Closed 18 months ago

#3517 closed Enhancement (Closed)

Need configurate icon_sizes.

Reported by: zcho Owned by:
Priority: normal Milestone: Long Term Future Release
Component: Core Version: 1.8 Beta
Severity: minor Keywords:
Cc: brett@… Difficulty:

Description

For many designs the standard size does not fit.

In actions/avatar/crop.php and actions/avatar/upolad.php

@todo make this configurable?
$icon_sizes = array(
...

Yes. Plz make it configurable, may be in admin section, or engine config.

Change History (6)

comment:1 Changed 2 years ago by cash

Agreed. We need to balance adding options against performance (more db calls potentially) and complexity. It does seem like this one passes the test.

We should add the ability to update previously uploaded avatars to the new sizes.

comment:2 Changed 2 years ago by ewinslow

In general, I think the solution should be that the system is passed a pixel value for the size. If a version of the icon with that size doesn't exist, one is created and cached on the fly from the master copy. We can also come up with a way to support different icons for diminishing sizes as is the case with page icons for example.

Developers would still be encouraged to use the "size" keywords (small, medium, large, etc) so as to be cross-theme compatible.

comment:3 Changed 2 years ago by ewinslow

If the system optimizes this by caching the pixel values of the keyword sizes upon upload, that's fine too, but also generating new versions on the fly from pixel sizes means 1) no need to run huge upgrade scripts that converts all existing images -- they'll get "converted" over time as people request them, and 2) independent services could integrate the avatars/icons from an Elgg installation in precisely the right sizes appropriate for *their* theme, similar to how the gravatar plugin works with gravatar.

comment:4 Changed 23 months ago by ewinslow

  • Milestone changed from Needs Review to Future Release
  • Type changed from Defect to Enhancement

comment:5 Changed 18 months ago by ewinslow

Is this done?

comment:6 Changed 18 months ago by cash

  • Resolution set to Closed
  • Status changed from new to closed

Yes. Icon sizes can now be configured through settings.php and there is another ticket for dynamically generating the images.

Note: See TracTickets for help on using tickets.