Questions tagged [media]

An image, audio or a video comprises a media.

Filter by
Sorted by
Tagged with
1 vote
0 answers
1k views

Add PDF to ACF image field from file url

I am basically looping some fields from a gravity form entries. I using this function below to pass a file url into $filename and convert the file into a media library item, and then attaching that ...
joshmoto's user avatar
  • 447
0 votes
1 answer
31 views

media file uploading

i am using this query in my plugin to uploading media file , when i keep it file in wp_enqueue_script it working properly except after i select the image , this code does not return on wordpress page. ...
Arshpreet Venveru's user avatar
0 votes
0 answers
55 views

Modify Maximum upload file size text in Wordpress Media

I'm working with my own plugin development for my website. I need to modify the text of the Maximum Upload file size (post-upload-UI). I tried with the below hooks. wp_handle_upload_prefilter, post-...
tacker's user avatar
  • 3
0 votes
0 answers
458 views

Code snippet to add filter pre_post_link to change Media URL (post_type attachment permalink/slug)

I found a very good code snippet to add a "base" into URL of blog posts: Custom permalink structure with a prefix just for posts I tested it and it works great for post_type: post (to test ...
Ben Hoven's user avatar
0 votes
1 answer
71 views

Can't locate custom image sizes defined by child theme

I'm developing a child theme (mms-child) based on a simple parent (mms – also my dev). I am quite used to the usual way of defining custom image sizes within functions.php as follows: ...
mtm's user avatar
  • 41
2 votes
0 answers
148 views

How to host different file formats/types for a media attachment without creating multiple attachments?

For a better browser compatibility we often have to maintain multiple format of a media. For example: Image - JPG & WebP Image animated - GIF & WebP Image transparent - PNG & WebP Video - ...
Sisir's user avatar
  • 7,772
1 vote
0 answers
45 views

Updating Media Published Date When Parent Post Is Modified in Wordpress

I am hoping to make the published date of my media files always equal the modified date of the post it's attached to. e.g. Image 1 (date: 1/1/20 5:00PM) is attached to Post 1 (date: 1/1/20 5:00PM) ...
JimmyNeutron666's user avatar
0 votes
2 answers
652 views

Missing a temporary folder not fixed

I uploaded my first wordpress website on the server, but trying to add new media files, i have got the message "Missing a temporary folder", I tried the solutions on the forum: define('...
Hind Dev's user avatar
  • 103
0 votes
0 answers
428 views

WordPress REST API to get all media not working

I am attempting to get all the media from my site www.napkinsights.com. However, when I call https://napkinsights.com/wp-json/wp/v2/media, I am given an empty array []. How would I be able to get all ...
Sveltestorb70's user avatar
0 votes
1 answer
486 views

Building a Featured Gallery component for Gutenberg

I'm building a Featured Gallery component for Gutenberg. As a guide, I'm using the existing Featured Image component from Gutenberg. Basically, instead of storing a single image id, the component ...
leemon's user avatar
  • 1,806
0 votes
1 answer
1k views

Images not loading on webpage, and links to other media give 404 Not Found

Had some recent problems where to start with only homepage text was visible, all other pages/links gave 404 Not Found. Now managed to get pages to function but all images fail to load, plus links to ...
Jamie's user avatar
  • 1
0 votes
0 answers
87 views

How to remove media by filename?

For some reasons, when I´m doing an import of data to make posts and medias, I can have : Some media not attached but with an image Some files still saved in uploads folder but not visible in Library ...
J.BizMai's user avatar
  • 820
0 votes
1 answer
1k views

Uploading a media item with the wp-json API to a specific path

I'm using the WP-JSON API to import all my posts from my live site to my development site. It's working fine for posts, categories and authors, but when I upload my images, the API treats the files as ...
Pezholio's user avatar
  • 101
2 votes
0 answers
160 views

wp_get_attachment_image_src() returns wrong url

wp_get_attachment_image_src() is returning a wrong image url. It returns the original url instead of the cropped one. Here some example code: $ptId = get_post_thumbnail_id( $productId ); ...
Ferdy Fiers's user avatar
0 votes
1 answer
128 views

How to programatically toggle the media setting "Organize my uploads into month- and year-based folders"?

How can I programmatically change this setting?
John Dee's user avatar
  • 503
0 votes
0 answers
1k views

media_handle_upload() returns Specified file failed upload test

I am trying to make media_handle_upload() work but I keep getting 'Specified file failed upload test.' This is how I am testing it: <html> <body> <form method="post" enctype='...
marcnyc's user avatar
  • 121
0 votes
1 answer
502 views

In the media Rest API, what is "missing_image_sizes"?

I'm trying to understand the media rest-API. The last item in the schema: What is this? Missing vis-a-vi what exactly? Is this information used somehow by default? Reference: developer.wordpress.org/...
John Dee's user avatar
  • 503
1 vote
2 answers
1k views

Force documents to appear in Featured Image dialogue

Having a perplexing issue... ...for a custom post-type called 'Resources' I used the 'Featured Image' or 'thumbnail' function within WordPress to allow users to attach documents to 'Resources'. The ...
Tony Djukic's user avatar
  • 1,968
0 votes
1 answer
417 views

Disable Responsive Image Sizes crop

I think my question might similar to others.Here is my problem, I want to remove generating wordpress responsive images because I have done image responsive solution with my way. So, I don't wanna ...
Por's user avatar
  • 372
2 votes
1 answer
726 views

How to make programmatic image upload generate thumbnail and sizes?

I have written a function to add a remotely-hosted image to the Media Library. It does so. However, it does not generate a thumbnail in the Media Library - and I believe standard practice should also ...
Robert Andrews's user avatar
0 votes
0 answers
797 views

The uploaded file could not be moved to wp-content/uploads

Not a folder permission issue. My website is evilsoulstudios.com. I am trying to upload an image using the "Upload New Media" with-in WordPress. I am all of a sudden getting an error "The uploaded ...
Kevin's user avatar
  • 1
0 votes
1 answer
103 views

Media isn't showing in Wordpress library but is available in uploads folder

I am trying to migrate my site from shared hosting to the digital ocean. I have uploaded wp-content and my site is over 3 years old. Now when I am checking into the media on the dashboard. Files ...
Yogita Suresh Taluja's user avatar
1 vote
1 answer
108 views

Create Media via REST API from Android Application

I am not sure if this post will be considered as duplicate since the same is on stackoverflow.com. I am trying to upload a file to WordPress using REST API. I have tried different headers, values but ...
Abdullah's user avatar
  • 111
0 votes
0 answers
32 views

unsharp thumbnails after uploading image

I googled for a whole day and didn't found a solution. I tried a lot of plug ins and so on, but didn't get it. If I upload for example that image here: https://deermylove.com/wp-content/uploads/...
Denis's user avatar
  • 9
1 vote
0 answers
91 views

Get Image from Media Library with the Title

i have set the Title from a Image in my MediaLibrary to "slider". I want to add this Picture via. Code to my page.php file. I dont want to use the ID, I want to use the Title. How can i do this? ...
yama_HD's user avatar
  • 111
0 votes
0 answers
41 views

How can I limit access to uploaded media depending on the logged in user's user role?

I have a pretty straight-forward Wordpress site that uses a plugin called Subway to restrict access on the page only to logged in users. There's also the following .htaccess-rule: RewriteCond %{...
Oleg's user avatar
  • 101
0 votes
1 answer
34 views

Append Media/Attachment IDs to Gallery Shortcode HTML Output

I've been trying to find a simple and elegant solution to append the media/attachment IDs to my [gallery] shortcode html output. I've seen various functions to rewrite the whole output of the [gallery]...
tylorreimer's user avatar
1 vote
0 answers
212 views

See List View - or Image titles- of Media Library when "Add Media" button is used

When using Add Media button, the Media Library only shows thumbnails. Is there a way to show the list view instead, or in addition to the thumbnail, show the image title? My client needs to drop ...
Shelly Caldwell's user avatar
0 votes
0 answers
12 views

Adding Files to Page Only Adds Title, Doesn't Create Link

I have run into a really weird problem. When I go to add a file to a page or post using the Add Media button, Wordpress only inserts the title of the file and doesn't create the link, it's only the ...
Matt's user avatar
  • 1
1 vote
1 answer
538 views

How to replicate Media Library "Add New" on Plugin Settings Page

When you click the Add New button next to the Media Library page title... It opens the Drop files to upload template... I want to replicate that on my plugin settings page. Ideally using default WP ...
Kirkland's user avatar
  • 298
1 vote
0 answers
142 views

How to hide some specific attachments using post meta from media library

I want to hide some attachements with specific meta value from media library. I have hide attachments in list view of media library using the below function add_action( 'load-upload.php' , '...
Abhishek's user avatar
2 votes
1 answer
611 views

WordPress suddenly starts uploading media to an old (backdated) folder

I've seen a couple of people ask about this but without a general conclusion. It worked until recently, but recently all media uploads from the media upload tool end up in an old folder, 2019/10, ...
Ivan Voras's user avatar
0 votes
1 answer
53 views

Add a metabox when editing a media - but only for images

Is it possible to add a metabox for medias (attachments), but only if they are images ? I don't want this metabox on other file types. Thanks
gordie's user avatar
  • 482
0 votes
0 answers
23 views

Updated wordpress missing image upload area

Our wordpress updated yesterday. We are on version 5.3.2. Since the update the upload files function within a page is blank. I have included a screenshot, I wondered if anyone else has had this ...
Alexandra Paton's user avatar
0 votes
0 answers
352 views

WP REST API Create media return Timeout Gateway in response, but media created

Have a problem with REST API for creating media Trying post image to WordPress and got the good result – media created and Postman got response with id of the new image. But when I run request from ...
Andrey Golubitskiy's user avatar
1 vote
1 answer
881 views

Post edit - Media Library - Only get images from current post

I've got a few ACF Image fields for posts And I want to only query the images in the media library browser already uploaded and used on the current post. In other words, when opening the media library ...
Tim's user avatar
  • 157
0 votes
1 answer
877 views

WordPress image title attribute becomes permalink? [duplicate]

I'm managing a WordPress site with a strange problem. When images are uploaded to the media library, a page is being generated with a permalink that uses the image's title attribute. For example, if ...
joakland's user avatar
  • 251
0 votes
0 answers
13 views

Default media uploader is not showing in wordpress website

There is a custom post type events in the website. When I create a new post under events i am facing issue with media uploader When i tried to upload the featured images in the english version of the ...
Vivek's user avatar
  • 43
0 votes
2 answers
39 views

Unable to add logo or header [closed]

I want to add a logo on my WordPress website by customizing the theme "Bard", but every time I select an image from my library, it leads to a blank page. The same happens with the header image. And ...
Bella Swan's user avatar
0 votes
1 answer
206 views

How to migrate post media from stand-alone to multisite build

We have a stand-alone wordpress site we're migrating to a multisite build. The two builds are on two separate servers, but are using the same domain. We're currently accessing the multisite build by ...
Ryan's user avatar
  • 221
0 votes
0 answers
3k views

Post-processing of the image failed

When uploading 8 pictures via Media, Add New, I get this error: Post-processing of the image failed. If this is a photo or a large image, please scale it down to 2500 pixels and upload it again. ...
Rick Hellewell's user avatar
0 votes
1 answer
63 views

Media Library not loading

I am Currently Experiencing some media file upload issues with WordPress within pages or posts. Adding media in the media section does not have this problem. Troubleshooting the Console shows some ...
Jthomas's user avatar
  • 11
1 vote
0 answers
37 views

adding images column to admin edit columns not working for SVG

I added the ability to use SVG as graphics on my site. They are showing up fine on the front end, but I'm having 2 issues on the backend. The problem is that I want to show post thumbnails on the ...
rudtek's user avatar
  • 5,979
2 votes
0 answers
46 views

How to re-arrange media uploaded using : media_handle_upload() as per year / month

I have been facing this issue that all the new media files are getting uploaded to single folder which was auto-generated during initial site development. Now since all new images are getting uploaded ...
Siddhesh Shirodkar's user avatar
1 vote
0 answers
2k views

How to upload media to a specific folder without a plugin in Wordpress?

Is there anybody who knows an article that explains and shows a code about creating our own plugin for organising media library with folders in the admin? All media that I upload goes in the wp admin ...
Sara Teofilova's user avatar
1 vote
0 answers
1k views

How to extend an existing (Gutenberg) block

One of my Wordpress sites has a custom field for media which contains the credit for the media item. (Something like "Photo by John Doe".) Before Gutenberg, I overwrote the default shortcode which ...
MastaBaba's user avatar
  • 231
0 votes
1 answer
48 views

WP media upload issues

I've come across a lot of people facing this issue that was eventually solved by file permission. I'm getting this error: The uploaded file could not be moved to wp-content/uploads/sites/4/2019/...
Monomoni's user avatar
  • 101
1 vote
2 answers
274 views

Easy way to delete 70k posts and attached media?

A plugin created lots of posts that I now need to delete. They are targetable by category (e.g. Tweet). Many also have attached images. I wrote a php script for it*, but without pagination it gets ...
Julix's user avatar
  • 131
0 votes
1 answer
249 views

Images not displaying on site or media library

I ran into a problem with my site which is basically a portfolio site. I show my works as galleries in different pages. When I first uploaded my media, everything was fine and the site looked good. ...
A.Ra's user avatar
  • 21
1 vote
2 answers
719 views

Wordpress uploads autocreate folder every month

In start of every month WP creating folder with month number, like /uploads/2019/11, and it's creating with ROOT, so I dont have permission to write it. If I delete it, and then it's creating when I ...
Алексей Передерий's user avatar

1 2 3
4
5
22