How do I embed an image at actual size?
Under ATTACHMENT DISPLAY SETTINGS > Size > Select Full Size from the drop down menu.
Under ATTACHMENT DISPLAY SETTINGS > Size > Select Full Size from the drop down menu.
Can’t deliver a working example but there is this relevant section in wp-includes/js/media-views.js on Line 3173: media.view.AttachmentFilters.Uploaded = media.view.AttachmentFilters.extend({ createFilters: function() { var type = this.model.get(‘type’), types = media.view.settings.mimeTypes, text; if ( types && type ) text = types[ type ]; this.filters = { all: { text: text || l10n.allMediaItems, props: { uploadedTo: null, orderby: … Read more
I will not follow the whole metabox thing, but Just to point some ” leads ” as you asked regarding the upload folder .. The upload dir in wordpress is set via the wp_upload_dir() function – which is filterable .. $uploads = apply_filters( ‘upload_dir’, array( ‘path’ => $dir, ‘url’ => $url, ‘subdir’ => $subdir, ‘basedir’ … Read more
It is possible but it needs some developing effort. First of all it is important to know that WordPress default »galleries« are not discrete resources you can address with an separate URL. They are just shortcodes defined on a single posts context. So what you need to do is to define a URL the thumbnails … Read more
Custom post type Featured Image popup not working
You can use a tax query for all “Reference Type” terms, which will retrieve all attachments that have at least one “Reference Type” term. $rt_media = new WP_Query( array( ‘posts_per_page’ => -1, ‘post_type’ => ‘attachment’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘reference_type’, ‘terms’ => get_terms( ‘reference_type’, array( ‘hide_empty’ => false, ‘fields’ => ‘ids’, ) ) … Read more
Missing Images in Uploads Directory (Server Only)
Some images don’t get linked when setting link-to to media-image
I’d suggest you check the $featuredimg URL. If there is already an attachment with this URL just get the ID and call update_post_meta( $pid, ‘_thumbnail_id’, $thumb_id ); There’s a useful function to get the ID for an existing URL: Philip Newcomer function pn_get_attachment_id_from_url( $attachment_url=”” ) { global $wpdb; $attachment_id = false; // If there is … Read more
using media_handle_sideload() to add mp4 files to Media Library