[ad_1]
Moderator
t-p
(@t-p)
Review these plugins:
Alternate, try adding in the functions.php of a child theme the following:add_filter( 'wp_upload_image_mime_transforms', '__return_empty_array' );
Hi @aivanov12, if you don’t want to install a third-party plugin you can use this little snippet to create your own plugin and block those image types, and more if you desire, just add them to the $key_extensions array.
function excluded_mimes($mimes) {
$key_extensions = array('png', 'webp');
foreach ($key_extensions as $ext) {
unset( $mimes[$ext] );
}
return $mimes;
}
add_filter('upload_mimes', 'excluded_mimes');`
Moderator
t-p
(@t-p)
Side note to @krysal ,
if you don’t want to install a third-party plugin
FYI: these plugins are NOT “third-party plugin”. These plugins are available here in the
Thanks for the correction @t-p! Admittedly I didn’t look at the URLs. So @aivanov12, as @t-p suggest, probably the easier solution is to use the plugin.
Unfortunately none of the above codes work for me. Thank you. I add in functions.php but no result.
Moderator
t-p
(@t-p)
Have you tried any of the plugins?
