Skip to content

Conversation

@SebastianKrupinski
Copy link
Contributor

@SebastianKrupinski SebastianKrupinski commented Sep 15, 2025

  • Resolves: # client ticket

Summary

Before

Custom favourite icon was only generate when imagick svg support was turned on

After

Custom favourite is generate even when imagick svg support is not present, as long a a supported image format is used

image

Testing

  1. Make sure Imagick is installed
  2. In Administrative settings -> Themes -> Update the logo and favicon use PNG to start (this should reset the image cache)
  3. Log out then log back in (This should generate new favicon visible in the browser tab by the tab headeing)
  4. Repeat test with SVG enable and svg logo and favicon

TODO

  • Tests

Checklist

@SebastianKrupinski SebastianKrupinski self-assigned this Sep 15, 2025
@SebastianKrupinski SebastianKrupinski added the 2. developing Work in progress label Sep 15, 2025
@SebastianKrupinski SebastianKrupinski force-pushed the fix/favourite-icon-without-imagick-svg-support branch 2 times, most recently from e08e5d4 to 23ab2ba Compare September 16, 2025 16:19
@SebastianKrupinski SebastianKrupinski force-pushed the fix/favourite-icon-without-imagick-svg-support branch from 941959d to aa1d4ef Compare October 8, 2025 11:58
@SebastianKrupinski SebastianKrupinski marked this pull request as ready for review October 8, 2025 12:59
@SebastianKrupinski SebastianKrupinski requested review from come-nc and salmart-dev and removed request for a team October 8, 2025 12:59
@ChristophWurst

This comment was marked as resolved.

@szaimen
Copy link
Contributor

szaimen commented Nov 4, 2025

@SebastianKrupinski does this address #36607?

@SebastianKrupinski SebastianKrupinski added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 4, 2025
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@SebastianKrupinski SebastianKrupinski force-pushed the fix/favourite-icon-without-imagick-svg-support branch from aa1d4ef to 08869d2 Compare November 4, 2025 10:32
@SebastianKrupinski

This comment was marked as resolved.

@SebastianKrupinski
Copy link
Contributor Author

SebastianKrupinski commented Nov 4, 2025

@SebastianKrupinski does this address #36607?

No, it still uses imagick, but it no longer requires imagick svg support, to generate icons, the icons where generated as png's anyway, it only requires imagick png support and a png logo. But it will generate themed svg icons also

If we want to generate themed icons, we have to either limit the input formats to png, and we can use another library like php-gd, or stick with imagick as its the only one that supports svg.

Unless we drop the whole themed icons idea then we can drop imagick

@szaimen
Copy link
Contributor

szaimen commented Nov 4, 2025

@SebastianKrupinski does this address #36607?

No, it still uses imagick, but it no longer requires imagick svg support, to generate icons, the icons where generated as png's anyway, it only requires imagick png support and a png logo. But it will generate themed svg icons also

If we want to generate themed icons, we have to either limit the input formats to png, and we can use another library like php-gd, or stick with imagick as its the only one that supports svg.

Unless we drop the whole themed icons idea then we can drop imagick

It seems like svg favicons are supported by all major browsers nowadays. I was wondering if it would be possible to have svgs stacked on top of each other by using masks or something for which we dont need to use imagick?

@SebastianKrupinski
Copy link
Contributor Author

It seems like svg favicons are supported by all major browsers nowadays. I was wondering if it would be possible to have svgs stacked on top of each other by using masks or something for which we dont need to use imagick?

It's possible, but we would need to find a pure php library or someone would have to write one, then you also need to consider that the input image (logo) would have to be a svg also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants