3

Is it possible to disable the cropping step when adding a site icon via the Theme Customizer in WordPress 5+ (occurred to me in 5.5)?

For me cropping is unnecessary because I always upload a square image in the directions of the recommendations.

That's why this step is not helping me at all, instead is actually causing the following problems:

  • It creates an unnecessary copy of the image with a cropped prefix.
  • For the cropped image it creates a NEW attachment.

Thus all the settings I did for the attachment of the un-cropped image are lost and the filename of the site icon will always include this cropped prefix.

Is there anyway to fix this without patching the source of this problem?

4

2 Answers 2

1

To force the site icon to be a specific attachment you can use the wp-admin/options.php page and search for the site_icon label then change the value of the field to the attachment ID you would like it to be.

Of course this also can be done via SQL, with a query somewhat similar to:

update wp_options set option_value=123 where option_name='site_icon';

Note that this only works once you initialized the site_icon option.

1
0

Unfortunately, there's still no fix to this issue. WordPress will still crop the image even though your favicon is 512px x 512px.

To solve this issue, I installed Elementor and updated my site icon via the Site Settings. It doesn't crop the image and you won't have to deal with an additional file in your media library with the cropped prefix.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.