Plugin generates imagesizes 18×10 and 16×12 of ALL images and bloat the server
-
Hello TranslatePress-Team, first thanks for your great work <3
I found out that my server has thousands of images, with the size of 18×10 and 16×12 pixels, generate automatic by TranslatePress default-settings with no sense, because nobody need a post-image or user-image as flag i any case. Why your plugin do that?
I found 2 topics here with code for the functions.php but new block-themes has no functions.php so i installed the Code Snippets plugin and paste the code as new php-function but since then nothing change and TranslatePress still generate 18×10 and 16×12 pixel images of EVERY new post.Here is the code:
function wpdocs_remove_plugin_image_sizes() {
remove_image_size( ‘trp-custom-language-flag’);
}
add_action(‘init’, ‘wpdocs_remove_plugin_image_sizes’);
Would it be possible to build in a new option like “Stop generating images from normal posts” so additional flags (i think that’s a really rare case because all standard flags are shipped onboard by default) will still work but normal posts and there images will not affected?
A second way would be, to insert a image-upload for additional flags ONLY at page=trp_advanced_page#custom_language , that would be the much easier way that not affect the post-generation or media library at all.
Additional cleaning-option would be nice too:
Checkbox -> Search for falsely generate flags and delete them
For others with the same problem and bloated server-space: Right now i have to use WPCLI and the following commands. Find and delete them:find . -name *-18x10.* | xargs rm -f
find . -name *-16x12.* | xargs rm -f
I think that suggestion could save 300,000+ users, millions of megabytes at your next update. Hope there will be a way to stop that in future <3
- The topic ‘Plugin generates imagesizes 18×10 and 16×12 of ALL images and bloat the server’ is closed to new replies.