This happens because capital letter like JPG,JPEG,GIP are not the allowed mime types in wordpress.
For list of allowed mime types check the codex.
Now to get your code work, you need to add the capital mime types into the allowed mime types.
You can do it by adding the following code in your active theme’s functions.php
file
add_filter( 'mime_types', 'wpse125310_mime_types' );
function wpse125310_mime_types( $output ) {
$output['JPG'] = 'image/JPG';
$output['JPEG'] = 'image/JPEG';
$output['GIP'] = 'image/GIP';
return $output;
}
You can add other mimetypes to the above too.
Related Posts:
- How can I add an image upload field directly to a custom write panel?
- How to implement add_image_size in a plugin
- How to catch images with blank dimensions?
- How to find attachment ID for first image in a post
- Having Problem On Getting WP Post Gallery Images URL
- Set first image (external) as featured image / thumbnail
- Hook event for upload image in the menu
- How to get an image transferred via FTP or script to appear in Media Manager?
- Add media and attach images to pages
- Is there a better way to implement responsive images than what WordPress uses by default?
- Save image as featured image
- How to show large image in checkout page using WP Ecommerce plugin [closed]
- Hook to get image filename when it is uploaded
- Resizing Images for a Gallery-Plugin?
- How to serve different thumbnails/images depending on users browser/platform
- How to Upload Images From a Folder (Not WP_Uploads)
- How to export post meta with images in wordpress
- Get attachments from a post
- Putting a resized image into media library with wp_get_image_editor(
- Display list of uploaded images, filtered by user under a specific user group
- Upload multiple images and insert them into custom html code
- Which is the better way to store images for the plugin?
- Uploaded attachment not set as featured image
- How do I change the image from the default mysteryman in the WP Profile page
- Hook after attachment added and cropped
- Conditional Generation of Image Sizes using add_image_size
- how to change image of jquery slider plugin
- WP Still Generating 150×150 Thumbnail Size Even After Un-Setting Small Size in Functions.php
- Cleaning a filename after image sideloading a url that contains `%20`
- How to list all images used on a specific page?
- Screenshots on plugin page taken old [closed]
- How to move an image in a plugin to the upload directory and make it as a media of wordpress?
- The URL of images on my website changed after being set as featured image
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- WordPress Favicon not Working For Images/Videos/PDFs
- Adding the image selector/uploader to an admin back page
- WordPress discards PNG file when uploading plugin file
- Hook for validating and rejecting frontend image upload
- WordPress Iframe for blog image
- Replace the WordPress Media Library Uploader
- Caption Shortcode: what filter to change the image size?
- Filter the_content() to add custom figure tags
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- Images not displaying on live server
- Using “add_image_size” to register custom image sizes inside plugins not working
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- Displaying an Uploaded Image as a Custom Avatar in WordPress
- Add a custom image source
- Upload to a specific media folder created by FileBird Lite
- Set srcset on a block image
- Default table collation on plugin activation?
- How to implement color picker from wordpress in my plugin?
- Nonces can be reused multiple times? Bug / Security issue?
- How to auto-upgrade my plugin?
- How to Add a .js file Only in one specific Page Dynamically to Head
- Missing “category_children” option when dynamically creating categories via a plugin
- Developing a plug-in to charge for
- 404 errors after plugin options update and category base change
- How to determine, from plugin script, if active theme has The Post Title
- Widget Admin – Form Submit Event?
- add_filter : Passing an array instead of the callback function?
- Using wp_parse_args to set up Plugin Default Settings
- how to add Jquery script to one page?
- how do you prevent showing a particular category on the admin dashboard for specific user roles?
- get_posts() not working when accessing with a custom user role
- Do I have to worry about useState causing a re-render?
- Plugin sub-menu pages recommended structure and links
- mysql_real_escape_string() vs. esc_sql() in WordPress
- Bug: Post needs to be updated twice when adding action for save_post hook
- my own SVN for a plugin/theme
- How to enqueue scripts in right way in a plugin?
- How can I add function calls to my plugin’s options.php default submit routine?
- Secruity Questions on a timer
- Open tab on current day problem jQuery and WordPress
- Plugin working on my local installation but Cannot be activated online
- Is there a WordPress plugin to design WebGL? [closed]
- How to get post meta in functions?
- Plugin access to average users not only admin
- Rewrite not working since upgrade to 5.9
- Why won’t this submenu page show? – My First WordPress Plugin
- Can display plugin without shortcode?
- ACF Field value in wordpress login message filter
- Overriding the template files using a plugin for all themes
- Plugin removes itself if mistake made during edit
- Using meta_key & meta_value in add_rewrite_rule
- Can’t create a blank template
- Custom Registration Form and Passwords
- Determine if the current page, is being edited
- Fullwidth slider using background image Flexslider WordPress
- Return value of $wpdb->update() query in plugin is wrong
- Is there a way to tell if a shorcode’s handler is being run before or after the content formatting filter?
- Plugin files not updated (cache cleared)
- How to limit the number of posts a user can view based on status
- How to create an embedded code for wordpress shortcode?
- How to add additional field in a table row after creating a table?
- WordPress plugin tables become corrupt
- How to call a new php page inside a plugin page?
- How can i call from custom fields to the category editor?
- If I want to create new taxonomies (e.g. Project / Documents / Etc…) is it better to create them in the theme’s functions.php or within a plugin? [duplicate]