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
- Objective Best Practices for Plugin Development? [closed]
- How can I add an option to the Page Template list from a Plugin?
- Build path for a custom portfolio plugin
- How to save block attributes when the output doesn’t change
- How to: Rest endpoint returning empty object
- Ensuring a plugin is loaded/run last?
- Scheduled event does not run at midnight
- Plugin options table,is the data serialized
- Converting theme widgets to plugins?
- Sample — test — data for large WordPress install
- What is rich_editing?
- How Can I setup WP CLI on Windows development machine running AMPPS?
- WP_LOCALIZE_SCRIPT doesn’t work
- JS / JQuery form validation in backend admin menus
- wp_enqueue_script + wp_enqueue_style Since When
- How to send email in wordpress with more than one attachments
- Modify users.php page to create page/post on button clicked
- get_current_screen() return null
- Frontend language per user
- How to run a function on plugin’s options page?
- What stylesheets are available in core?
- dbDelta using Foreign key not working on update [duplicate]
- Plugin widget zindex changes depending on theme [closed]
- Is there documentation reference for forms in menu and setting pages?
- Plugin templates vs Parent Theme
- WordPress Plugin Activate / Deactive Failing
- Custom Plugin – CSS works, JS doesn’t
- Plugin Development: Storing and Manipulating Data That Fits JSON in Database
- How to set a header in wp_safe_remote_get()?
- I need to combine Pages Listing and Main Menu from frontend in WordPress
- WordPress Does not grab the string sends useing AJAX response, wp_ajax hook
- update_option() passing empty array() but still updating
- Bad request 400 using class based files
- Insert, update or remove data from database (usermeta)
- AJAX call of function containing javascript which is not loaded (Plugin development)
- How do I make two shortcode use the same id and increment it when I use them multiple times?
- How to CRUD from wordpress database in wordpress theme?
- How can I query 3 posts from diferente categories (one of each category)
- Can a plugin differentiate syndication feeds from actual site views?
- Plugin settings checkbox
- Adding querystring variable breaks admin URLs
- How to check during “pre_get_posts” if WP performing default query for specific custom template?
- WordPress Beginer to Guru [duplicate]
- How to show data on a table
- echo statement repeats
- Create Unique and Customized User ID for Website Members in WordPress
- How to automatically convert images to WebP on WordPress?
- pre_set_site_transient_update_plugins not updating
- Execute callback after REST API request completes + Response is sent