Can I stop wordpress generating media sizes
You can use remove_image_size() to remove previously registered image sizes. Ex : <?php remove_image_size(‘full-width-image-gallery’); ?> Note: Cannot be used on reserved image size names
You can use remove_image_size() to remove previously registered image sizes. Ex : <?php remove_image_size(‘full-width-image-gallery’); ?> Note: Cannot be used on reserved image size names
You can use a plugin called Media Library Assistant. After you install it go to your Media > Assitant (wp-admin/upload.php?page=mla-menu). Select all the images or the ones you want to edit. Click on Bulk Actions. Click on Edit and then Apply. Then you will see Uploaded on and use the date you wish.
Take a look at wp_enqueue_media funciton. It enqueues all scripts, styles, settings, and templates necessary to use all media JS APIs. Then you can execute wp.media function: var button = document.querySelector(‘.button’); button.addEventListener(‘click’, function(e) { e.preventDefault(); var frame = wp.media({ title: ‘Frame title’, multiple: false }); frame.on(‘select’, function () { var attachment = frame.state().get(‘selection’).first().toJSON(); alert(attachment.url); }); … Read more
I haven’t actually tested this, but came across the following code on my travels. Might this help? get_post_meta($attachment_id, ‘_wp_attachment_image_alt’, true)
I think that the best option here would be to disable the generation of additional image sizes on adding an image to the media library. Doing so is fairly straight-forward: Visit the Settings > Media page of your WordPress dashboard. Under the Image Sizes section, change all of the values to 0. Save the changes. … Read more
There used to be an issue with WordPress – but that should have been fixed 5 years ago: Preserve PNG transparency/alpha during thumbnail creation If you’re using a newer WP installation (which I suppose) this issue might be rather a problem with the GD library of your server than with WordPress. And as far as I know … Read more
Yes, this is a known problem between ios devices and WordPress. It’s a real issue due to the high numbers of iPhone/ipad users who also use WordPress, and I’m surprised it hasn’t been addressed in the WordPress core. Looks like it’s still being debated/ worked on here. It’s a question that’s been asked before here. … Read more
Attachments in WP are stored as posts of type attachment which reference files physically stored in the uploads folder. This is why if you FTP a file into the uploads folder it doesn’t appear in the media library. This means the media library is a post archive, much like other post archives in the admin … Read more
you can move the wp.media stuff to an external function which accepts the element as a parameter and call it on the click event like this: jQuery(document).ready(function($){ $(‘.media-upload-button’).click(function(e) { e.preventDefault(); upload_image($(this)); return false; }); }); function upload_image(el){ var $ = jQuery; var custom_uploader; var button = $(el); var id = button.attr(‘id’).replace(‘_button’, ”); if (custom_uploader) { … Read more
After reading up on the Backbone.js documentation I found out it’s quite easy to manually add attachments by ID to the library of the media frame. You can just assign a reference to the library on the open event. Then create an instance of wp.media.attachment. Fetch it. And then call the add function on your … Read more