Questions tagged [media]
An image, audio or a video comprises a media.
1,076
questions
0
votes
0
answers
9
views
Media Library Issues
(All plugins disabled) I have some strange issues with the media library. It's an old site that I have been managing for the last 2 years. The site has dated media folders on disk going back to /2010/...
0
votes
0
answers
14
views
Image is cropped on the "wrong" side [closed]
I have two containers side by side in Elementor & inserted an image with "background overlay" on the left side.
When I resize the browser window, the image on the right is cropped. But I ...
0
votes
0
answers
19
views
For Gutenberg block editor, how do I use media query to add a smaller size of a background image to display on the mobile version of a site [closed]
On a page with different background images in different sections. I uploaded a smaller size of one of the background images to media, then in ‘additional css class’, I added a class(bgmobile) to the ...
0
votes
1
answer
15
views
Different upload file size limits based on file type
I would like to put a different limitation on uploading content in the media library ( depending on file size and file type)
For example :
Upload mp4 (allow maximum upload file size 64mo)
Upload pdf (...
0
votes
1
answer
13
views
audio tags no longer working
On my website, I had a plugin, that displayed a media tag like [audio src=path/file.mp3]. It returned this tag in the HTML retruned from the shortcode function.
function init() {
add_shortcode('...
1
vote
1
answer
16
views
wp-content/uploads/year/month returns 404
I have a litespeed hosting
I have disabled all plugins and all wordpress related htaccess rewrites.
If I go to https://digitalzoomstudio.net/wp-content/uploads/2023/ - then I can see the directory ...
0
votes
0
answers
11
views
images inside uploads folder will return 404
My images will not load . accessing anything inside the uploads folder returns 404 https://digitalzoomstudio.net/wp-content/uploads/2022/11/image-1-1024x617.png
I am 99% sure I am not crazy and that ...
0
votes
0
answers
16
views
Undefined array key "width" in wp-admin/includes/image.php error when publishing post or page
When publishing a post or page that includes trusted SVG files in the content, WordPress spits out the errors Undefined array key "width" in wp-admin/includes/image.php and Undefined array ...
0
votes
0
answers
10
views
Replacing embedded post images from another site
I am migrating a site to a new domain which contains post with embedded images. Is there an automated way for me to get the images uploaded to my site and replace the embedded of the old domain with ...
2
votes
0
answers
64
views
How do I display a PDF thumbnail as a link to the PDF without uploading the image
When I found a couple of years ago that WordPress will create thumbnails of uploaded PDFs, I was so happy, thinking I wouldn't have to make and upload separate PDF cover images to have a thumbnail ...
0
votes
0
answers
20
views
Permission to edit media files (photo captions, alt tags)
What permission is required for a user to be able to edit all media files in Wordpress?
I'm trying to edit the captions and alt tags of some media files in Wordpress. I can see the media file in the &...
0
votes
0
answers
21
views
Cache API Images to Prevent Hot Linking
I'm building a shortcode that display's a list of items from a public API, that each have a thumbnail URL. If I use the URL as src attribute, I create a request to their server for every image.
I want ...
0
votes
0
answers
9
views
media not opening in a new tab
I have links to many media links that are photos on a post in wordpress. I have the settings as "open in a new tab." Unfortunately whenever I click on them it just opens up the photo on the ...
0
votes
1
answer
60
views
How can I get the Media Library backend to show larger thumbnails?
I have a pretty simple need. On the admin screens, my media gallery is reducing my picture thumbnails to about 145x145 so they'll fit in 6 columns across the screen. The only way I can get a good look ...
0
votes
0
answers
26
views
Multimedia upload error in my wordpress job board plugin
I have the below code in my plugin. Admin is meant to be able to insert funding_amount, funding_deadline, and funding_multimedia_field from the dashboard if the resource category chosen is funding. ...
0
votes
0
answers
8
views
How to upload multiple images to use as gallery in Kirki Framework
I am using Kirki Option framework which works like charm in most cases, I recently shifted from Redux framework. I have a section in my website for the gallery, I want to upload multiple images using ...
0
votes
1
answer
99
views
Uploading images via ACF update_field function
I am trying to update image fields within a group in ACF via the update_field function
I am successfully adding the images to the media gallery but I am having trouble getting them added to each ACF ...
1
vote
1
answer
53
views
How can I get all attachments by a user on a WP multisite network?
I'm creating a front-end based project where users can make posts and add images to them. It's a network of sites that users have access to.
For a better user experience, I want users to be able to ...
0
votes
1
answer
35
views
Detach Wordpress Media Files In Bulk
Just switched WP themes and I have about 1300 media files attached to what Wordpress is calling a 'Private Post'.
These Private Posts are actually photo portfolios from the previous theme. 200 ...
1
vote
0
answers
43
views
Problem with "is_user_logged_in()" and woocommerce (Code for custom media upload for each author.)
I'm sorry for my english...
I am using the following code to create separate media directories for each author..
( Thanks to https://wordpress.stackexchange.com/a/400352/220907 )
function ...
0
votes
1
answer
117
views
How allow only the uploading user access to media
I have an application that requires that only the user + admin can access files uploaded by that user?
EG a user uploads an image to media. Only that user should have access to it
Thanks for any tips
...
0
votes
0
answers
9
views
How can I move the position of the View attachment page link on the Attachment Details popup in the Media Library?
I'm not trying to be lazy but I can't seem to find a hook which describes how this might be done.
0
votes
0
answers
22
views
Unable to access media library, but getting an error as forbidden You don't have permission to access this resource. I have administrative rights
Unable to access media library, but getting an error as forbidden You don't have permission to access this resource. I have administrative rights
2
votes
1
answer
41
views
wp.media multiple selection limit
When I use wp.media dialog , is there a way to limit how many files can be selected when multiple option is used?
wp.media({
library:{
type: "audio"
},
...
0
votes
1
answer
48
views
How to solve too many files in uploads folder(s)?
my wordpress has this setting for upload - .../uploads/{year}/{month}
However I noticed that some folders (like .../uploads/2023/06) have 30+ thousands files.
So I want to relocate them to new ...
0
votes
0
answers
21
views
image block select modal > custom tab on the media modal with filtered media and allow select media
I want to do a plugin to mark some media files as Favorite and then the favorite media marked allow be displayed on the Select image modal that is showed when a user try to add or replace an image via ...
0
votes
0
answers
16
views
My images aren't loading after adding update_option('upload_url_path', '')
I tried using update_option('upload_url_path', '/product_large') to change the url of my images. After updating the functions.php my images aren't loading in my site. Any possible solution? Thanks!
0
votes
0
answers
33
views
Optimize blog that serves hundred of images and videos
We have a website that contains 20,000+ media. It serves images and videos per post(500 post as of now). Opening posts takes a very long time to open because it contains images(500+) and videos(50+).
...
0
votes
0
answers
29
views
Add to Media Inserter Categories
As of Wordpress 6.2, Openverse was integrated into wordpress and it is available under the Media Tab of the Inserter.
I want to develop a plugin that integrates another stock image service into the ...
0
votes
1
answer
269
views
Uploading media to wordpress API with C# HttpClient
I was trying to save some media but I can't get it to work. I don't know if its the authorization is the wrong format, or if its the content is just put in wrong. If someone knows how to please help ...
0
votes
0
answers
83
views
Add custom css class to wp-list-table row for Media Screen
How to add class to the row of WP List Table in Media List page like the following.
Add custom css class to wp-list-table row for custom post type
Thanks
1
vote
1
answer
128
views
wp media regenerate says "no regeneration needed" whe that's no the case
I'm trying to generate thumbnails for a PDF attachment. Right now in the uploads/ folder there is only the PDF file, no image thumbnails related to it.
But when I run the regeneration with :
wp media ...
0
votes
1
answer
71
views
Does WordPress import export tool keeps the file hosted on the old website?
I have an old website with several GBs of media data. i want to export the media files with wordpress export / import tool to my new website. Wordpress gives me a 10mb .xml file out of the several GBs ...
0
votes
0
answers
10
views
Close featured image modal windows with JS
I'm developing a plugin which let you select a fectured image for a post from an external resource e.g. an API
When I select an image, I want the image select window to close. I have tried with:
wp....
0
votes
1
answer
223
views
What is the proper use of guid for images in wp_posts?
I understand that guid is a unique reference for a post, whether that post is a post or an attachment.
When it's a post, I think guid is self-evident. But what is the correct formulation/destination ...
0
votes
2
answers
936
views
upload image with rest API to the media library
I am working on uploading an image to the media library and then attaching it to the featured image. I put the code below in my functions.php file and submitted a JSON file through postman, but for ...
1
vote
0
answers
42
views
upload image to wordpress media library failed for custom post type
image upload failed. I tried to upload gym logo as thumbnail image for gym post type. All the form elements are working. But image upload is not working. images are not appearing in WordPress media ...
0
votes
0
answers
131
views
How to properly move media files and update data?
Bashing my head against a wall here.
I want to write a function that moves the actual file of a Media Library attachment, but this must necessarily update all metadata.
I am already doing a foreach on ...
0
votes
0
answers
115
views
Looking for a way to insert PDF image preview in TinyMCE
We're still using TinyMCE as our post editor.
When Editors use the 'Add Media' button to select a PDF from the Media Library, they choose the thumbnail or medium size image from the Attachment Display ...
0
votes
0
answers
18
views
Is it possible to restrict the number of media uploads (photos) per user?
I've got a community site using BuddyPress and Paid Memberships Pro where I'd like to restrict the number of files a free user can upload. I've seen it's possible as MediaPress has a paid addon, but I ...
0
votes
1
answer
102
views
How To Convert External Image URLs To Own Website's Uploaded Images Automatically?
I have a website with over 300 posts and initially I used to use external image URLs in my blogs instead of uploading it to my DB and using them.
Is there any way to automatically get all the external ...
0
votes
1
answer
233
views
Image in binary in the data to WordPress media library
A specific API, returns an image in binary in the data.
If I need to save it to the server, I can easily do it by following the code.
$response = curl_exec($curl); // This is the API response
...
0
votes
0
answers
34
views
Upload the images folder with sub-folders directly to server
I have a News_images folder with a lot of subfolders in it.
Each subfolder contains images for one post.
I want to upload the whole News folder to the server
then access the subfolders with WP Media ...
0
votes
0
answers
24
views
Custom Search on media files PDF images pages posts
Hi all – hoping to find a code solution for developing a custom search bar in WordPress that searches for both Posts/Pages but will ALSO search for media files such as PDFs and images. Basically I ...
0
votes
0
answers
4
views
Inserting Media on New Post But Hides Previous Uploads for Editor/Contributor
We have a community website where people upload media. However, We wanted to restrict them to upload and attach previously uploaded media so that the previously uploaded media on different post are ...
0
votes
0
answers
30
views
Updating Media Library PDF's in bulk
I've built a new site for my client that uses PDF's from the old site media library. He's redesigned all the pdf's and now has asked me to replace them on site. It should be noted that the old PDFs a ...
1
vote
0
answers
51
views
Give attachments an archive page, and exclude unattached ones
I am extending the use of Media/"Attachments" so that they have a custom taxonomy of "Medium" and I can display taxonomy archives on the frontend. I'd only like the archive query ...
0
votes
0
answers
29
views
Uploaded images not displaying full size preview or inserting into posts
Original issue
I was having an issue where image uploads gave the error “could not insert attachment into the database.”
PHP memory limit and other settings are fine
Disk space is fine
Ran check on ...
0
votes
0
answers
160
views
Add link to media files in backend and modify linked images in the frontend
since a while I am looking for a way to
add a "link to" option to the media library in the backend (this is working already - using the filter 'attachment_fields_to_edit')
if there is a ...
0
votes
1
answer
7
views
Why some images are not allowed to be edited only for thumbnails?
please see this:
As you can see, on the right columns I don't have the classic 'apply to' radios, where you can choose to apply modifications only to thumbnails.
It happens only with certain images, ...