- This topic has 20 replies, 3 voices, and was last updated 3 years, 6 months ago by Tom.
October 30, 2017 at 4:25 am #412841NBC
When I upload my site logo within the Customizer, the process creates the following files:
index.png [the actual upload]
Annoyingly enough, cropped-index.png and index.png are exactly the same size (512 pixels square).
Why in the dickens does the process use cropped-index.png instead of index.png? Why does it need to add “cropped-” on the beginning of the file names? They’re not cropped, just downsized! Talk about bloat: Every time the site code references the index file, the length of the name adds a boatload of useless bytes.
Any way to clean this up? I understand the thumbnail generation process that produces these two files
but why can’t it just use the index.png file I uploaded and skip the “cropped-” designations on the smaller sizes it creates?
Thanks for any insights!GeneratePress 1.4GP Premium 1.4.3October 30, 2017 at 9:48 am #413086TomLead DeveloperLead Developer
That’s strange – maybe you have a plugin installed which is registering a bunch of sizes? If image sizes are registered in WordPress, they will be generated on every single image upload.October 30, 2017 at 10:57 am #413142NBC
My problem isn’t so much with the thumbnail sizes as it is with the idea that the system creates a “cropped” version of the index file that’s exactly the same size as the original upload and uses the “cropped” version.
WP creates up to 3 thumbnail sizes for every upload, but my problem is the cropped stuff.October 30, 2017 at 10:33 pm #413414TomLead DeveloperLead Developer
Definitely weird – never seen it before. My first guess is a plugin you have installed.
It could be the system GPP uses to crop images, but you’ve have to have the image size set in Customize > Blog > Featured Images. We’ve changed to a more modern image resizing script in GPP 1.5, which is due for release this week.October 31, 2017 at 2:17 am #413477NBC
Here’s the plug-in list for the site:
All-in-One WP Migration
Broken Link Checker
Contact Form 7
Easy Custom Sidebars
Posts in Sidebar
Rename Media Files
Velvet Blues Update URLs
Regenerate Thumbnails only kicks in if you activate it manually. Otherwise, it just sits there. All plug-ins are up to date.October 31, 2017 at 7:48 am #413617LeoStaffCustomer SupportNovember 1, 2017 at 3:41 am #414140NBC
I deactivated all my plug-ins except for GPP. Same result: Cropped files appear when I replace the site logo.November 1, 2017 at 9:40 am #414384TomLead DeveloperLead Developer
So with all of them deactivated, you uploaded a new image and those files were still created?
What about if you deactivate GPP as well?November 1, 2017 at 9:52 am #414386NBC
No joy. Steps as follows:
All plug-ins deactivated.
In Customizer, chose to replace the site logo.
Media library comes up. Deleted both the original and the “cropped” versions of the index file. (Verified that the files really were gone, which all of them were, including the thumbnail variants.)
Switched to upload tab. Uploaded index file.
Presto! Still getting cropped files.November 1, 2017 at 5:53 pm #414569TomLead DeveloperLead Developer
Hmm, so that means it has to be your WP installation. Perhaps something server related? Really hard for me to tell unfortunately – there must be something different happening on your installation than others, as I’ve never seen anything like that before.November 2, 2017 at 1:33 am #414729NBC
On localhost, I’m using a bog-standard install of WP. Download ZIP file from WordPress.org, place in site folder, expand. Before I ran these tests, I updated WP to 4.8.3.
The site as it exists online is an import of an All-in-One WP Migration export. The site has been updated to WP 4.8.3.
Just now, I ran the same tests on the live site. Deactivate all plug-ins, remove site logo through Customizer, remove site-logo file (and “cropped-” version) from media library, re-upload site-logo file, re-select it in the Customizer. View site and open a site-code view page. Examine name of site-logo file in site code. Same “cropped-” file names.
I have sent you the URL of the live site via e-mail message.November 3, 2017 at 12:59 pm #415799NBC
Any thoughts on this file-proliferation problem? I run into it repeatedly.November 3, 2017 at 4:51 pm #415873TomLead DeveloperLead Developer
Unfortunately I don’t really know why that’s happening to your images. I’ve never seen WordPress created a filename-cropped.png file.
Here’s my localhost using using the latest of everything: https://www.screencast.com/t/5De3dSDxp
The fact that I can’t reproduce tells me there must be a function running on your site that isn’t running on my site. If it’s not a plugin or the theme, then perhaps it’s some sort of server setting?
I know this isn’t very helpful, but I’m afraid I don’t have an answer. It might be worth reproducing with the Twenty Seventeen theme and no plugins, then report your findings to WordPress.org.
Be sure to mention you have no plugins and the Twenty Seventeen theme activated, or else their first reply will ask you to do that anyways.November 4, 2017 at 3:18 am #415983NBC
I’ll create a new test site with a new database and try the same test with 2017 and no plug-ins.
I get the same phenomenon on live sites, and that’s not using my localhost installation.
Will report back as to the outcome!
Thanks again, Tom!November 4, 2017 at 3:42 am #415986NBC
2017 does the exact same thing. In fact, when I add the site logo, the upload screen shows two instances of the image although I’ve only uploaded it once. The first is represented by an icon; the second shows a preview of my logo file. The first is cropped; the second is not. However, both files have the same pixel dimensions.
I’ll delete the bitmap and redo the process, taking screen shots of each step, and post to WordPress.org about it.
- You must be logged in to reply to this topic.