This is part of the WordPress template system, it allows you to drill down and further customize output based in the template hierarchy, for instance if you want the attachments to have separate functionality/style then your single.php
, you simply create attachment.php
or go even further with MIME_type.php
(like images).
http://codex.wordpress.org/images/1/18/Template_Hierarchy.png
Also you have 4 url options when inserting single images: custom url, file, post or none
Related Posts:
- Get the first image from post content (eg.: hotlinked images)
- How do I get gallery thumbnail URL and change the default thumbnail size?
- Add attachment for all images in post
- Gallery thumbnails very small
- Getting Different Size Of Attachment Images
- How to show a manageable list of images on a post?
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- How can I add a single image from a gallery into the page header?
- The the_post_thumbnail without srcset?
- How to modify an image block in Gutenberg WordPress 5?
- wp_get_attachment_image_attributes not working for me
- Specify image dimensions
- How to get gallery images?
- Featured Image in 4.4 should be larger on mobile device
- How to use the responsive images feature from WP 4.4 in your themes
- Confused about image sizing business in WordPress
- Unexpected width and srcset attributes for the_post_thumbnail();
- Having Problem On Getting WP Post Gallery Images URL
- How to remove title attribute from gallery links and images
- Responsive class to all the images in the content
- How wordpress handle upload images and how to use them in the code
- Get a Page’s attachments in Gallery order
- Doubled titles when using All in One SEO with custom template
- How can you determine whether an image is merely attached or has actually been inserted into a post?
- Get attachments by user
- Cannot get full thumbnail size using the_post_thumbnail
- Add image attachment to post via coding?
- How do I attach images to a post without inserting them?
- wp_get_attachment_image_src() width and height boolean
- using jQuery Cycle by Malsup with WordPress Page and Gallery
- How to float an image in Gutenberg
- How to provide support for [gallery] shortcode?
- Attach media to multiple posts
- Why an arugment is missing in wp_get_attachment_image_attributes?
- Reasons why all thumbnail sizes aren’t working
- Exclude images from “inserted into post” when trying to get attachments
- How do I Add images uploaded in the post to a default custom field
- Change “Thumbnail”, “Medium” and “Large” image sizes using functions.php?
- Customizing the attachement page to show rest of all images in a gallery from post
- Default image size not working
- Bootstrap card columns change images size
- Fetch wordpress video attachment with post ID
- WordPress Media Uploader in page template (On Front-end)
- How do I include pre-installed images in a theme?
- How to add custom meta box under Gallery Settings in the “Edit Gallery” popup
- Changing Header Image Every N Minutes/Seconds
- Do not display post images on front page
- Custom image size vs CSS sizing
- In creating a theme, how can i allow a user to change an image outside post/page content?
- Change Responsive Images Maximum Width of 1600px
- WordPress HTML5 Gallery Support – Convert HTML4 -> HTML5
- Change image size depending on page
- How to disable thumbnail filter for a specific template part or image size?
- How to obfuscate theme directory URLs
- Adding a gallery to my first theme
- Are seven additional image sizes are too many?
- Remove link on full-size images
- how to retrieve the image title for image Post Format
- WordPress creating images if uploaded image is greater than 960px on one side?
- How to fix WordPress images not showing up in local hosted XAMPP server?
- View list of all attachments on site
- Change Image Sizes for Mobile Theme
- How to get the next and previous image title from attachment or gallery?
- Stop WordPress from showing images on non post pages
- Is there a way to serve different resolution images to different devices?
- How can I scale down the width of images in bulk that are embedded in posts throughout the site?
- Excluding post thumbnail from the attachment.php when using wordpress gallery
- Add image URL automatically to custom field?
- changing the default picture size link url
- Theming media inserts
- How can I remove image taxonomy pages from my theme and from Google?
- Dynamic Image Links Depending on Excerpt/’Single Post’ View
- Designing a custom archive.php inspired by the Autofocus theme
- ACF get_sub_field ALT TAG in the repeater doesn’t show
- Gallery functionality in custom theme
- WordPress Animation Adjustments
- theme directory fallback image outputs url and not the image
- Post Featured Image Custom Sizing?
- Lightbox not showing image caption
- How to add an image to a theme page template in code?
- Responsive Images with art direction
- Integrate video and iframe in a post type gallery
- Customizer Image-Picker Preview Not Working
- Uncaught Reference error in Retina.js
- Can’t upload images on new theme
- Images use & location, on new wordpress theme
- Create image with imagepng() (fails at header)
- attachment.php & flexslider—linking thumbnail to specific image
- How to store and retrieve the attachment alignment?
- Change default options on attachment page
- How to show post attachment image
- Custom image size doesn’t work
- Retina ready for uploaded images which are cropped
- wp_get_attachment_link() add rel attribute if the link points to direct image
- How to force unlink on attached/inserted images?
- Add rel to all images in a post
- Isotope overlapping .items because of featured images – HELP! [closed]
- Image Attachments Query Not Working If Post Is Loaded Via Ajax
- Custom Theme functions.php – Using add_settings_field and input type=”file” to set custom logo
- I want to resize post featured image without cropping image. How?