So what’s wrong with adding in the attributes as Mark is saying?
<?php $thumb = get_post_thumbnail_id();
$img_url = wp_get_attachment_url( $thumb,'full' );
$image = aq_resize( $img_url, 150, 200, true, true, true );
?>
<img src="https://wordpress.stackexchange.com/questions/223038/<?php if($image) { echo esc_url($image);
} else {
echo catch_that_image();} ?>" width="150" height="200" alt="<?php echo get_bloginfo('name'); ?>"/>
Related Posts:
- Remove images (files) that were generated when using add_image_size()
- Displaying images from external RSS feeds?
- Why should I use “Organize my uploads into month- and year-based folders” option? (Cons/Pros)
- Which action hook can I use when a featured image has been selected
- Displaying images with relative paths in the editor
- Prevent image upload unless exact size
- Fixing external image urls
- Associate an existing image with a post
- Image resize with image url
- Preview Image Path in Admin Section
- The WordPress Gallery, Grabbing The Link and Images?
- Featured Images on Front Page
- Display different header images based on current page
- How to upload images from my directory into my wordpress?
- Ability to edit image via WYSIWYG
- Add a featured image in my theme?
- Why images/photos after being uploaded to my wordpress site get slightly blurry?
- Featured Image .svg height and width 1px only
- Extend core block attributes in post content
- Images are randomly deleted from server
- Rename image file by post title
- Rename media files generated during upload
- Featured image (responsive) above content is too small after update to WordPress 4.4
- How to show only posts with images?
- Image popup in a lightbox / overlay from the backend 3.5 admin area (plugin)
- Auto resize images after adding a new size
- Upload .doc to blog
- media sideload image and Google Content
- Making images in posts link to the image file rather than the attachment page
- offload media to external services [closed]
- How can I insert an image map into a WordPress blog post?
- image in my post disappeared after I upload website to remote server
- How to create ‘Local’ filters for WordPress srcset sizes in template parts?
- Isolating images in uploads not used/recognised by WordPress
- Add width & height attributes to Gutenberg’s image output?
- How to filter the image embed code based on link type
- Include image in excerpt
- images not showing after transfer
- Retain the original name of the image on resize
- WordPress 4.1 header image problem
- force feed readers to pick atom version
- Creating a post image to show in a gallery
- Don’t show images inserted into content
- Replace post/page titles with an image in WordPress
- What happened to the media manger?
- I want to Add My Product Image to Admin Order Email in Woocommerece [closed]
- Howto use WP built in Thickbox for images?
- Remove Image Sizes in Media Settings Page
- image_resize() with blank space [closed]
- Re-ordering images in existing post in wordpress 3.6.1
- Change Image folder Locations
- “HTTP Error” or Network Error (tcp_error) when uploading image
- Hide Featured Image box – isn’t working?
- Optimising uploads folder then re-uploading?
- Using a .pdf file as a page in wordpress
- WordPress Attachments with old images
- How to display image in mail header using wp_mail()
- a: hover issue with image issues [closed]
- How to remove “Image Information” and “post date/author” from a media page?
- How to change picture size
- image_downsize returning an Array?
- Why is WordPress automatically modifying image URLs? (Tracking pixel from RSS)
- Add images to my theme with html
- How to disable a WP Image Block to link to itself?
- Issue with LazyLoad, sometimes my pictures aren’t showing
- Images going blank after a while
- Confused about image sizes generated by WordPress
- Allow users to upload and display multiple photos
- Initializing the cropper for image uploads
- How to bulk change media item’s link?
- cant upload media/pictures to my wordpress site, cant upload anything to my database
- Custom Image Widget
- WordPress on IIS works except for image upload widget: Win 10 Pro
- How to use default image as featured image by implement some code in function.php
- attachment_fields_to_save first parameter is null
- The image keep redirect to my previous URL after I moving my site
- I cannot upload images to post or the media library in wordpress
- Responsive Featured Images Not Working
- WordPress 404 Images – Images not found after deleted from media
- How to delete images from database with product
- WordPress Shortcode to display featured images only
- Changing current post image uls with a function
- Display images in template file
- Changing image size displayed in wordpress twenty fourteen theme
- How to watermark wordpress images from wp-content/uploads folder with htaccess and php?
- How to display every pictures from all the posts on one page?
- How to add multiple images in a page
- Only User Upload image Http Error
- See the all uploaded images of a user as an admin
- Broken Media Library
- how to display all images from their siblings/ from same parent?
- Define Folder to save Images
- adding images to wordpress pagination?
- Custom filename when pasting an image from clipboard
- WordPress Bootstrap dynamic carousel showing images separately not as carousel
- How do you change all images dimensions to have the same size?
- Faster image upload on mobile [closed]
- WP_Image_Editor – How to save the new size of the image in the sizes metadata
- Is is possible to append .webp to srcset images using wp_filter_content_tags()?
- Could a very long article slow down all website and wpadmin?