remove duplicate images from library|
-
hello, the library has some images with too many sizes that are unwanted or needed. so I was given this code and told to paste it into child theme-php functions editor and this would remove those extras. the code can be written to target any specific class of images. Inserted the code but nothing changed, no images deleted. Is the code wrong, did I put in the child theme incorrectly?
add_action(‘init’, ‘disable_thumbs’);
function disable_thumbs(){
remove_image_size(‘portfolio-full’);
remove_image_size(‘recent-posts’);
remove_image_size(‘recent-works-thumbnail’);
remove_image_size(‘blog-large’);
remove_image_size(‘blog-medium’);
remove_image_size(‘related-img’);
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘remove duplicate images from library|’ is closed to new replies.