Opened 2 months ago
Last modified 7 weeks ago
#63475 new defect (bug)
Changes made to the site icon image through media library are not reflected on the site icon
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Media | Keywords: | 2nd-opinion |
Focuses: | Cc: |
Description
If the image used as a site icon is edited through the media library and saved, then the changes made to the site icon image is reflected in the preview of the site icon in the settings -> general page but the changes are reflected on the actual site icon displayed for that site.
Steps to Reproduce -
- Go to Settings -> General and click on "Choose a Site Icon".
- Upload any image and set it as the Site Icon.
- Go to Media Library and select the image used as the site icon.
- Edit the image, do some changes like rotating the image and save the changes.
- Go to Settings -> General and check the site icon preview.
- Remove the site icon and again chose the same edited image as site icon.
- Save changes and observe.
Expected:
The site icon should be updated with the edited image.
Actual:
The site icon is still displayed as the original image.
Attachments (2)
Change History (11)
#1
@
2 months ago
Hi @avinashbhosale - I'd say this is because of the browser caching the favicon. Did you try to reload the site?
#2
@
2 months ago
@Presskopp Yes, I tried reloading the site as well. But it does not work. Still the original image is displayed as the site icon.
This ticket was mentioned in PR #8831 on WordPress/wordpress-develop by @nikunj8866.
2 months ago
#3
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/63475
#5
@
2 months ago
@Presskopp @avinashbhosale When an attachment is edited in the WordPress media editor (cropped or scaled), the image is regenerated only for standard and theme-registered sizes. However, the Site Icon image sizes (site_icon-32, site_icon-180, site_icon-192, site_icon-270) defined via WP_Site_Icon::additional_sizes() are not included in the regeneration process.
As a result:
- The edited image's attachment metadata (_wp_attachment_metadata) does not contain updated site_icon sizes.
- These sizes still reference old cropped files, even though the original was modified.
- Consequently, favicons and mobile icons may not reflect the new image.
#7
@
8 weeks ago
- Keywords needs-testing needs-test-info removed
Test Report
Description
This report validates that the patch works as expected.
Patch tested: [PR https://github.com/WordPress/wordpress-develop/pull/8831]
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.25
- Server: nginx/1.27.2
- Database: mysqli (Server: 8.4.4 / Client: mysqlnd 8.2.25)
- Browser: Chrome 136.0.0.0
- OS: macOS
- Theme: Twenty Sixteen 3.5
Actual Results
✅ Issue resolved with patch.
Additional Notes
- Although unrelated to the scope of the issue and patch, after cropping the site icon from the media library, the changes are not reflected immediately after saving the edits. Might take this up in a separate issue.
#8
@
8 weeks ago
Test Report
Description:
This report validates that the patch works as expected.
Patch tested: [PR https://github.com/WordPress/wordpress-develop/pull/8831]
Environment
WordPress: 6.81
PHP: 8.2.27
Server: nginx
Database: MySQL 8.0.35
Browser: Chrome Version 136.0.7103.114 (Official Build) (64-bit)
OS: Windows 10
Theme: Twenty Twenty Five v4.2
Actual Results
✅ Issue resolved with patch.
Additional Notes
After saving the edit from media library the changes are not reflected immediately. After we click somewhere on the admin panel then the changes are reflected on the site icon.
#9
@
7 weeks ago
- Keywords 2nd-opinion added; has-patch removed
- Version changed from 6.8 to 4.3
This is going to need to be a bit more complicated since site icons have a specific requirement: namely, that they are 512x512 squares.
I think that if you are editing a site icon in the media library, you should be warned about it. I also think that if you change the image to no longer be an acceptable size, it should warn you and possible prevent saving.
This also seems to be how site icons have worked since 4.3, so adjusting the version accordingly.
Video attachment of the issue