You have to do a small bit of magic to get the url with the correct size image:
$image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $idx ), "size" );
You should put in the appropriate thumbnail size for “size” at the end, of course 🙂 Sounds like you’d want “full”.
Make this a variable in your while variables, then in your array, call something like:
'thumb-link' => $image_url[0]
(For posterity, the Codex reference for related info: http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src; sizes listed here: http://codex.wordpress.org/Post_Thumbnails)
Related Posts:
- add_image_size() for specific Post Types
- How to disable generation of default image sizes for some custom post types?
- set_post_thumbnail_size in percent, not pixels?
- add_image_size for post type
- Change post featured image on hover
- Custom Image Thumbnails of Different Sizes
- Multiple featured sizes / images / excerpts
- How can i add thumbnails images to particular post (using code not admin pannel) in wordpress
- Is it possible to add posts and images (auto resize) for custom post types with a script?
- Using Image Sizes for Custom Post Types outside the Loop
- link featured image to external link
- Thumbnails Not Generating
- Front end post or photo or both
- set_post_thumbnail or media_sideload_image adds image multiple times in media library
- How to Create Grey Background for Product Images on Website Display but Retain White Background on Downloaded JPGs?
- Add custom image size for custom post type or taxonomy
- How to automatically set ‘default image size’ for specific Custom Post Type
- Problem: wp_query outputs all images on site
- unable to show custom post type featured image
- Problems with image size on the server WordPress
- frontend image post uploader
- Adding custom image sizes and post types to a plugin or to a theme?
- How do you create a custom template to display a category with an image and related posts below?
- How to handle large number of images in a post?
- How do you get the full size url of an attachment image
- Redirect to another page using contact form 7? [closed]
- How to add multiple images to a custom post type without plugin [closed]
- how to post default thumbnail if post not created yet
- get_the_post_thumbnail_url(‘full’) returns empty from custom post type
- Set featured image to archive.php
- Unable to set featured image
- Post-thumbnail only for specific post-types?
- How can i link a custom post type thumbnail to intermediate size
- Featured image size in column
- False Positive on has_post_thumbnail
- 3 random images from custom post type, each in a div with a diffrent class
- Custom post doesn’t show featured image
- Linking to Post Types from wp-admin
- How do you output an unknown number of images in a custom post type with desired markup?
- Auto post creation
- How do I link a featured photo to it’s post?
- copy images from custom field to another custom field
- Dynamic pages for linked categories and content
- Plain links in single-class.php and archive-class.php not working
- Highlight current post type when inside custom post type
- Cannot upload featured image to a custom post type
- Should i use custom post type for a custom footer?
- Add Permalink to Post Thumbnail, syntax code issues
- Adding link to dashboard sidebar, nested under custom post type
- Returning an image url from its attachment ID using a custom post type plugin
- Need help with simple “if statement” checks to output particlular CPT data depending on what client uploads/fills out
- Images not load on custom post type sidebar, related posts
- Not Able to Add New Class To CPT Attachment Image
- Publish box in CPT remove ‘edit’ link
- How to add Support to show Fullwidth Featured Image of Custom Post Types in WordPress.?
- i need to have a tab with gategory post
- Put featured image under post title in admin area
- How to add a default predefined thumbnail when creating a brand new post?
- DIVI Theme customizer changes not applied on existing pages and designs are not shown on the front
- How can I add image sizes for a specific custom post type?
- Change picture attachment meta of all occurrences of a picture
- Dupplication of Custom Post Type while adding attachment
- Media is not showing on post page
- Looping through image object using ACF and CPT UI [SOLVED]
- Multi Photo Upload with Caption on Front End for Custom Post Type
- Display featured images from custom post type in the homepage template
- Displaying image instead of post label in wordpress
- Links Image in “Catalog” Page to Posts
- why featured image option isn’t showing in custom post type?
- Problem to get the link of the default ‘post’ post type like the orther custom types
- How can I generate a list of post-type specific categories?
- Post Custom & Taxonomy 404 error
- Add featured image programatically to custom post type
- retrieve custom post image through widget
- How To Loop Through list with Custom Post Types
- How do I set a specific size for my image?
- Trying to get custom post type attachment images to function in indexed array
- Working with gallery shortcode and get gallery images
- Image paths on custom post types getting /post_type/ added to path
- Thumbnails for custom post not showing up in query
- How to scroll through post thumbnails?
- Making a thumbnail if there exist a link with. jpg or .png extension in WordPress
- Featured image in admin on custom post type
- Customized featured image doesn’t refresh in post admin metabox after upload/insert
- Retrieve post data via WPDB class
- Why the custom post type links don’t work if not login?
- How to Create a Frontend Html-list Editable in the Backend?
- Allow authors to create article image
- Specific Thumbnail Size for Custom Content Type
- Link to larger thumbnail in custom query (with custom post-types)
- Add Image field to CPT
- img src not working correctly in custom post type
- PHP Button Custom link [closed]
- Add a background image into a post [closed]
- Possible to limit internal link search to post types with Gutenberg editor?
- Delete old thumbnail when updating new
- Custom post type Premalinks main page and details page
- Using wp_insert_post to create custom posts with ACF image field
- Change CPT Edit Target Link for Admin List
- Replace the custom post type permalink