You can use the timthumb for resize your images as you want.
if ( has_post_thumbnail() ) {
// get the src of the large size featured image
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large' );
$thumbnailSrc = $src[0];
// output image resized with timthumb
?>
<a href="https://wordpress.stackexchange.com/questions/97632/<?php echo get_post_meta($postid,"post_link', true) ?>" target="_blank">
<img src="<?php bloginfo('template_directory'); ?>/js/timthumb.php?src=<?php echo $thumbnailSrc; ?>&h=240&w=245" alt="">
</a>
<?php } ?>
And download that file timthumb
Hopefully your problem solve.
Related Posts:
- Is there a hook which fires after all thumbnails are generated?
- get_the_post_thumbnail_url with an unregistered size
- Cropped featured image replaces original image in gallery
- How do I delete all generated images from my server except those currently used in posts
- Adding HTML within an image title attribute
- No srcset for hard-cropped thumbnails
- Cannot access the thumbnails of attachment images… Cannot find the reason
- alt, title tags not showing
- Removing Title Tag from Thumbnails
- How to make programmatic image upload generate thumbnail and sizes?
- Disable wordpress image sizes generation
- How do I remove generated HTML around images in posts?
- WP 3.4 has missing photo data
- Why html tags are being appended to my pictures?
- Display latest 12 images from media library
- Image Quality Thumbnail Compression in WordPress?
- How to resolve – IE 6 ignores img “width” properties
- Lazyload post thumbnails
- Show full image thumbnail
- Trying to create a mouseover effect in html using Gutenberg editor
- Get thumbnail url of custom meta image?
- Image thumbnails not available post migration, but still accessible via direct URL – DB issue
- Upload media files to Amazon S3
- How can I insert an image map into a WordPress blog post?
- Images will not display, when I call them up with html in wordpress, just two blank small spaces [closed]
- How to fix “.webp” being auto-added to the end of image urls
- How to stop thumbnail generation from some images and different size thumbnail generate
- Update old Post image metadata to ‘thumbnail’ wp_attached_file
- How to stop wordpress always displaying full-res images
- Changing default img html markup but not in admin back-end?
- Fixing image names for a site being restored
- force feed readers to pick atom version
- How to make thumbnails of uploaded animated gifs NOT animated
- Modifying the HTML Output of Inserted Images
- Gallery with thumbnail carousel
- Is it possible to change image size used for preview thumnail in Add Media popup
- Rewrite inline image markup
- Filter for post_thumbnail: link to small src and add data-attribute [duplicate]
- Dynamic image crop in WP 3.0+?
- How do I get a smaller size of an avatar image
- Why WordPress suddenly changed sizes of thumbnails?
- Stop WordPress compressing images? – Quality is terrible
- Rebuild thumbnails via WP Cli – how?
- Can’t add image to site via php
- Can we use featured image as third party website image URL
- Get an image from url, resize it, and save on a custom folder (not the media library)
- add_image_size not working
- Disable Media File Image Link On Mobile Devices
- Product Images Low Quality After Updating From WP 3.5 to 4 [closed]
- adding image to post thumbnail from another server
- What exactly is the description field when uploading an image?
- How to add thumbnails to posts and pages automatically in a uniformed fixed elegant way?
- Broken thumbnails (sometimes) with TimThumb
- HTML Img with data:image src gets sanitized in admin?
- Is it possible to save crop to a different size of the image when in image editor?
- how to change format jpg to webp?
- Apply manual image cropping not to thumbnail but medium_large size
- Landing Page with HTML CSS JS and Images on wordpress
- Images not showing after wordpres update 5.6
- how to regenerate webp et-pb-portfolio-image
- How to use default image as featured image by implement some code in function.php
- Auto Generate Thumbnail
- WordPress Multisite: Images moved to /sites/1?
- unsharp thumbnails after uploading image
- ADD class to all my images (thumbail)
- When upload a PNG a noise appears in the thumbnails
- I cannot upload images to post or the media library in wordpress
- Why image Thumbnail url is not displaying with custom size?
- Blank image thumbnails in media library
- How to disable post-thumbnail from generation?
- New portfolio items appearing smaller on the grid
- WordPress can’t detect any thumbnails size?
- How to link to img src using HTML email template in WordPress
- WooCommerce Variation Swatches and Photos – get attribute thumbnail
- Relative path not working at all in WAMP local environment
- Image thumbnail on single product issue | WooCommerce
- How Do I Auto Generate Thumbnail from First Embedded Image?
- Why doesn’t WordPress make thumbnails for videos?
- Create a custom attachment thumbnail for quick page load
- Why are my ‘medium’ images the wrong size
- Display ajax preloader for large images within posts
- Making a thumbnail if there exist a link with. jpg or .png extension in WordPress
- Garbled HTML pulled for page description “caption id=attachment…”
- Forcing absolute src links in the RSS feed
- where is images/image.jpg?
- Add custom version to an image
- Issues with the excerpt (wordcount/HTML/images)
- WP is showing wrong image dimensions
- How to include featured image on blog post preview?
- Parallax image problem
- Hover images and Videos
- Thumbnail size keeps resetting automatically
- Delete all thumbnails & regenerate them?
- Placing a background image with text over it
- Media Library shows default image instead of image preview
- Gutenberg block HTML image rendering override
- Trying WP editor to load full size image (not ‘300×300’)
- Why are PDF thumbnails over-saturated?
- show hide image script after 4 seconds [closed]
- Restricting users to view only media library items they have uploaded?