How to make “Upload files”selected by default in Insert Media?

I am frustrated having to click on the “Upload Files” constantly instead of the first choice being Upload Files in posts editor….How can i make “Upload files” selected by default instead of “Media library”? 2 Add this to your functions.php, or preferably a functionality plugin. add_action( ‘admin_footer-post-new.php’, ‘media_manager_default’ ); add_action( ‘admin_footer-post.php’, ‘media_manager_default’ ); function media_manager_default() … Read more

Prevent WordPress from generating medium_large 768px size of image uploads?

I prevent WordPress from generating thumbnail, medium, and large image sizes for images I upload to the Media Library, by setting their dimensions to 0 from the dashboard: Settings -> Media panel. I have also gotten rid of all instances of add_image_size and set_post_thumbnail_size from the functions.php file of my theme. However, when I upload … Read more

wp.media.view.ImageDetails – Save settings as HTML5 data-* attributes for image

What I finally want to achieve are extra settings added to the Image Details box, that will be stored in the image <img> tag as data-* attributes Example: <img src=”https://wordpress.stackexchange.com/questions/215979/…” data-my_setting=”https://wordpress.stackexchange.com/questions/215979/…”> MY CODE I am creating a plugin, and I need to create more settings for when you edit images. So far I have the … Read more

How to manage attachment relationships for specific posts in WP 3.5+

In WordPress 3.5, media management has changed entirely. Also, relating attachments to specific posts is (I believe) basically only being done for backward compatibility. Therefore, after uploading attachments from within the media modal to a post of any post type, it establishes a relationship where the post ID is the parent of the attachment ID, … Read more

Enhance Media Manager for Gallery

I would like to enhance the Media Editor, after WordPress 3.5, on the gallery view. I want to add a new select field on the right side and send the selected values to the gallery shortcode. I think, the function wp.media.gallery in wp-includes/js/media-editor.js is the default function to insert the gallery shortcode. I want to … Read more