The PHP function pathinfo()
will work to get the extension for files. If your theme is just using the attachment post title for its title, then loop through all post types of ‘attachment’, and/or post mime/type that contains ‘image’ and then use pathinfo to get the file extension and update the title based on that.
Related Posts:
- How to change image type for specific size?
- What’s the proper way to find and remove duplicate images from posts and the media library?
- Mixed content warnings after changing site adress from HTTP to HTTPS
- add_image_size() zoom-crop
- Insert an image into a post by API
- Which are precisely the predefined image sizes?
- Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
- Adjust image caption within visal editor
- Change Image URL to a CDN
- Slider image issue in wordpress
- Responsive Images – Add srcset attributes to custom Images Function
- Getting custom size image URL
- Retrieving images from a NextGEN gallery
- Query for recent images across multiple posts
- Loss of sharpness in jpg imported as header in twentyeleven
- Getting alt text of featured image
- Get image alt attribute just by image URL
- Can I the caption shortcode to set caption to a data attribute, and with the image’s alignment intact?
- How to resolve – IE 6 ignores img “width” properties
- WordPress is stripping the Alt tag’s quote marks from images where Alt is not set, but leaving the word ‘alt’ creating problems for ADA compliance
- WordPress reduces the full size image and uses it as the original
- Show taxonomy list with taxonomy images ( SOLVED)
- get_children() not working properly – Only on one post?
- Warning: getimagesize() [function.getimagesize]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 [closed]
- get the image of the post
- Is There A Way Of Using the_post_thumbnail() to Pull In A Specific Image From The Media Library
- Update image links in database
- ACF Image ID, echo the alt tag
- Change WordPress Media Manager
- How to stop images from being wrapped in tags?
- Output random (custom) image size
- WordPress crops images differently on retina screens?
- Out of memory error reporting
- How do I create an alternate RSS feed for tags with custom image sizes for MailChimp?
- Remove the inline styling added in wp_get_attachment_image()
- Broken image links even though links are correct and images exist
- Move Image Captions Inside Link ( tag) if Added
- Sharing images to social media – issue with aspect ratio
- How to add custom classes to figure element only if image has caption?
- How to add an image to a custom url?
- Get image from parent category
- Images attached to posts from library link to 404 error page
- Images not displayed when moving site to local
- Caption and title in img alt tag are the same?
- fetch images and videos
- Facebook og:image issues after https change [closed]
- Does WP create multiple images?
- How to use Facebox in WordPress theme?
- Mass crop images: Landscape images -> Portrait images
- Change image name during uploading sequentially
- Getting thumbnail of uploaded image
- Display image for first sticky post only
- Get all image IDs from the Media Library
- How to redirect homepage to actual URL?
- Can’t add image to site via php
- Cropped image file size larger than original, is it normal?
- Is it possible to enable the ‘Link To’ field under ‘Attachment Display Settings’ for a Featured Image?
- Save Image in wp_options-Table
- Can I register a new thumbnail size and have it be an option in “Add Media”?
- Is it possible to get feature image url (full-size) from an image url of smaller size?
- How to make Custom Loop not crop featured images?
- Using mysql to replace img src?
- Get Original Dimension Featured Image on the homepage
- WordPress keeps resizing my 947×947 image down to 500×500 (full-size option)
- Excluding post thumbnail from the attachment.php when using wordpress gallery
- Featured Image Thumbnail size on Twenty Ten Archive Page
- How do I display the featured image from an image gallery using a reference in code? (example within)
- attach several images to post + gallery
- caption shortcode inserts blank paragraph
- How to change background slider image when hovering on text?
- Can I achieve this with WordPress?
- Widget Style – Icon Type
- WordPress Problems
- Built-in image lazy loading: Does it come with a polyfill for older browsers?
- SQL: How to find all attachments that are not used in any posts/pages/custom_post_types
- I would like to set a FULL SCREEN background image to all my pages (same way it is on my home page)
- Enlarge Featured WordPress Images
- How to trigger “wp_handle_upload_prefilter” filter when uploading an image programatically?
- How to add element to the list of adjacent images?
- Responsive Images – Defining
- Why do images inserted in the post content via the_content() go off the max-width?
- WordPress Javascript displaying an image Question
- Broken images in media library
- Using a full-width hero image that can be changed in the dashboard by a user
- Resize External Image
- Images are not getting uploaded
- Fatal error: Allowed memory size in PHP when allocating less
- Resized images not working – 404
- Declare global variable that can be used on other function
- Background image call problem
- Assigning image to Post-Type won’t work anymore: exceeded time?
- How to replace all images within exported xml files to demo.jpg?
- An image on my site is showing as the wrong image [closed]
- Post migration – images do not display
- wp_handle_upload Image sizes
- Display Images from Array with wp_get_attachment_image() [closed]
- Orientation of featured image in post?
- Delete all thumbnails & regenerate them?
- Can I turn an image into a button?
- Gutenberg block HTML image rendering override