wordpress not generate thumnails for mp4 videos

You can output them on the front end using custom fields like this: printf( ‘<a href=”https://wordpress.stackexchange.com/questions/258892/%s”><img src=”https://wordpress.stackexchange.com/questions/258892/%s” /></a>’, get_post_meta( get_the_id(),’video_url’, true ), the_post_thumbnail_url() ); Or this if you want to use a different image for your video thumbnail printf( ‘<a href=”https://wordpress.stackexchange.com/questions/258892/%s”><img src=”https://wordpress.stackexchange.com/questions/258892/%s” /></a>’, get_post_meta( get_the_id(),’video_url’, true ), get_post_meta( get_the_id(),’video_img’, true ) );

Slow/Not Working Media Library Search

The wordpress media library do not scale well especially when searching for images. I know there was some work done in trying to make it better in the latest versions but there are some fundamental problems (flat structure) that are unlikely to be resolved without some refactoring of the whole code. If this is an … Read more

Pulling images from a subdomain

Managed to solve it myself.. So if anyone else has this problem. Because the sub-domain is still under the main domain you do not have to put – /home/hostname/subdomain.com you only need the /home/sub-domain.com and everything will work.. hope this helps someone.. Richard

Featured images get shrunken

Hey if you want to add custom image size then add the following code in your function.php file add_image_size( ‘thumb’, 220, 180, true ); and then call featured image in your template like this <?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. the_post_thumbnail(‘thumb’); } ?> … Read more

How to change compression of WordPress uploads including original image

For compressing the uploaded image I wrote a simple code snippet that immediately overwrites a newly uploaded file with an image whose quality can be specified: function wt_handle_upload_callback( $data ) { $image_quality = 30; // Change this according to your needs $file_path = $data[‘file’]; $image = false; switch ( $data[‘type’] ) { case ‘image/jpeg’: { … Read more

Remove the ‘Attachment Details’ section of the wordpress media manager

I use CSS for that: add_action(‘admin_head-post.php’, ‘hide_media_stuff_wpse_120894’ ); add_action(‘admin_head-post-new.php’, ‘hide_media_stuff_wpse_120894’ ); function hide_media_stuff_wpse_120894(){ ?> <style type=”text/css”> .attachment-details [data-setting=”title”], .attachment-details [data-setting=”caption”], .attachment-details [data-setting=”alt”], .attachment-details [data-setting=”description”], div.attachment-display-settings { display:none } </style> <?php }