Questions tagged [wordpress-media]

To navigate to the Media Library, navigate to My Sites → Site → Media.

The Media menu can be used to manage your existing media files, such as images, audio, videos, and documents. You can also upload new files to your Media Library using Media → Add New.

21 questions
10
votes
1 answer

WordPress Media Library Crop image on insert like Header Image Cropper

I'm working on a WordPress plugin that needs to force the images uploaded by a user to be a very specific proportions and ideally have the dimensions 1024 X 350 for use on the header of a page. The WordPress header image uploader provided by…
dpegasusm
  • 620
  • 2
  • 7
  • 20
2
votes
1 answer

Wordpress Media Library select multiple images on click

I have enqueued wp_enqueue_media(); on the frontend. I have dded two kind of buttons, one for single selection and the second for multiple images selection if($(this).hasClass('multiple-image-button')) { // Set the wp.media attributes …
1
vote
0 answers

Wordpree PODS default value for image field

Simple question, how do I configure a default fallback image for a image/video/media - custom field if no file is chosen? I've tried adding the media url to the "default"-fields under advanced but don't seem to work, and I can't find any…
Filleliii
  • 11
  • 1
1
vote
1 answer

WordPress delete all post attachments if not used on any other page

I've looked all over and am unable to find any code relating to my query. I essentially want to programmatically delete images, however, my issue is that some of the images used on these posts have been used on other posts and naturally deleting…
Daniel Vickers
  • 1,054
  • 1
  • 12
  • 32
1
vote
1 answer

Problem in use WordPress Media Library image URL to upload with wc_rest_upload_image_from_url

When I use wc_rest_upload_image_from_url and add an image url from wordpress media library e.g. .../wp-content/uploads/2022/04... I get following error: woocommerce_rest_invalid_remote_image_url Unauthorized Error Status 400
1
vote
1 answer

Photos not uploading in Wordpress media manager

I am trying to upload images into the media manager of a Wordpress website for my clients. No issues last time I touched this website, which was about a month ago. So far, I have: Tried uploading images that are already in the media manager (same…
Sydney
  • 35
  • 1
  • 8
0
votes
0 answers

WordPress: How do I edit the "loading" and "decoding" media attributes of a specific image?

In WordPress, media items (images) have attributes associated with them that control how they get rendered as HTML. WP version 5.5 added the loading attribute and version 6.1 added the decoding attribute. How do I actually change the values of these…
Chris Sears
  • 6,502
  • 5
  • 32
  • 35
0
votes
0 answers

Wrong image path in media library WordPress

I have a problem after importing many posts with there image on my new website. The URL is incorrect in media library so I can't use the image or see it in the media library. On the other side, all my imported posts get the correct path in the…
0
votes
0 answers

Wordpress image size select not showing in Gutenberg image block controls

I'm trying to insert an image into a post from the media library, but there is no select size option in the media library when selecting an image to choose which size to insert, and the 'Image size' control is not shown in the block editor image…
0
votes
0 answers

Media library empty on wordpress

I have a multisite wordpress website. All the subsites have media in the media library. I can go to dashboard -> media library and see all the media there for all subsites. But when I am trying to edit a page and use the add media option there to…
0
votes
1 answer

I want to know how Library select multiple images on click Wordpress Media

Hi guys I'm working with woocommerce and I would like to know how I can do so that when uploading a product and want to add multiple images to the gallery do not have to press ctrl if you can just click. I have found this here but I do not know…
0
votes
1 answer

How can I point my wordpress media library to use a mounted drive as its source?

I've set up LAMP server and installed WordPress on my Raspberry Pi 4. When it is run locally, I can mount a NAS into the wp-content folder, and I can add media to my WordPress Media Library. However, once I switch the site address from the local…
0
votes
1 answer

How to get the attachment id from the attachment page url?

I'm trying to get the id of the attachment from the attachment page url. When creating a custom post, I uploaded media to the post. The media now has an attachment page - http://localhost/site/custom-post/post-name/screenshot_20211005-091742/ How…
Sheldon
  • 9,639
  • 20
  • 59
  • 96
0
votes
2 answers

How to prevent WordPress Media Library from removing image?

I have a custom post type that must have its feature image. Its feature image also appears in the Media Library where user can delete the image/attachment file permanently. But I want to prevent user from deleting the feature image of my custom post…
O Connor
  • 4,236
  • 15
  • 50
  • 91
0
votes
1 answer

Gravity Forms multiple multi-file upload fields to automatically added to the WordPress Media Library

I have a Gravity Form that has multiple pages and on at least 3 of the pages there is a multi-file upload field. I am trying to take the uploaded items from each of these fields and automatically add them to the media library for further…
1
2