You’re almost correct.
You really can pass an array as size parameter for that function, but…
$size (string|array) (Optional) Image size to retrieve. Accepts any
valid image size, or an array of width and height values in pixels (in
that order). Default value: ‘thumbnail’
So you can’t use it in the way you wanted to…
You have to pass name of the size or an array that will define the size in pixels (width and height).
You can get only one size with one call of that function (as it returns only one value – url of image in given size).
But that’s not a problem, just call it twice:
$thumb_url = wp_get_attachment_image_url( get_the_ID(), 'thumbnail');
$full_url = wp_get_attachment_image_url( get_the_ID(), 'full');
Related Posts:
- Save image as featured image
- Thumbnails for media Library images
- Check for featured image in WP_Query
- Set first image (external) as featured image / thumbnail
- How to create thumbnail of different files?
- Add version query tag to all images
- Add Minimum Dimensions Text to Featured Image
- WP Still Generating 150×150 Thumbnail Size Even After Un-Setting Small Size in Functions.php
- The URL of images on my website changed after being set as featured image
- How to customize the size of Featured Images or Post Thumbnails in WordPress?
- problem with blank page
- What should I pass for $needed_dirs when calling _unzip_file_pclzip (aka PclZip)?
- Anyone using unzip_file successfully? It uploads the zip but doesn’t extract it!
- Custom Path for a Plugin
- WP 3-way voting system: On to something! Please help!
- Why is the expected file not being deleted?
- How can the_excerpt (or equivalent) be called on a category description?
- List categories with descriptions via plugin
- How to determine which capability to use?
- Plugin Creation: Overriding upload_max_size and post_max_size
- Will a plugin able to know is_user_logged_in?
- Plugin could not be activated because it triggered a fatal error?
- How to exclude “uncategorized” from custom categories widget?
- Problems with wierd characters and my plugin
- Get cat parameter from admin-ajax
- how to add custom fields into new & update post page?
- Widget instance options not showing correctly
- Questions about meta box: nonce and parameters available
- Remove Products From Category
- Update product prices from remote file
- How to add some basic inline CSS using existing plugin or theme?
- Serial Number from custom table not appear in woocommerce_email_before_order_table action
- Font size of HTML content
- WordPress: redirecting to the form page after form submission to admin-post.php
- Foreign wp_users ID in custom plugin DB table?
- Displaying custom content from a plugin within the active theme
- How to write a shopping queue line plugin with a queue button?
- Why does website stretch and white space on load? [duplicate]
- Custom Settings Plugin Save foreach checkboxes
- Auto hyper link text matching slugs/pages
- Modify custom block plugin without losing content
- Metabox is not displaying
- check_admin_referer()
- Downloading File via headers doesnt work
- get the permalink error
- Creating an ics calendar from custom post type
- Catch metabox values in Plugin
- wp.media Uncaught TypeError: Cannot read properties of undefined (reading ‘state’)
- Cannot output plugin twice with shortcode
- Exclude Woocommerce Product Category From Sitemap
- How to make an admin plugin menu page go full screen?
- want to show CMB2 metabox on woocommerce product data tab
- wp_schedule_single_event is set correctly but sometimes not fired
- How to add Support to show Fullwidth Featured Image of Custom Post Types in WordPress.?
- Dynamic page generation upon purchase of a product
- Customise Grouped Product display in Woocommerce with custom column
- WordPress (pagenow link) in ajaxurl change after i change plugin language
- Why is $_POST empty when saving custom Meta Box?
- Creating posts with links from a txt file
- WordPress video js error this.mediaElement.play is not a function
- It is possible to pass $args that sent by add_settings_field() inside another function?
- How to Get Last ID?
- Change reminder email date to 14 days before
- Console errors in 6.0-RC1 Widget screen
- Custom Icon for Plugin
- Change the behaviour of a button
- WP_Query order posts by category
- Custom Block Not Shown in Block Inserter
- How to override supports of innerBlocks?
- Login page too many redirects
- Set the payment processor callbacks to a plugin
- Configuring Xdebug with docker compose
- .htaccess with WordPress – create my own pretty url with parameters (above WordPress settings)
- Paragraph Tags removed when contents are only a shortcode
- how to show youtube comment profile pic in wordpress
- When I activate my custom plugin the menus and some styling of my site is messed up
- How to create archive page to add in menu
- Make a php array load faster
- wp.media libary pdf type
- Simulating timeout is not working
- Add multiple checkboxes as single field to Custom Shipping Method Settings Page
- Import images remotly run through timeout error
- How to make every image title equal to alt text(wordpress/woocommerce)?
- Custom payment method after payment user is logged out on thank you page
- Load specific page when a custom URL is hit
- Allow REST API Endpoint to specific user and hide from public
- How to use attributes in competent of Gutenberg
- Ajax on the Administration Side of plugin – returns 0
- Thumbnails not being generated for PDF files
- How to create wordpress media library UI on plugin page
- Why my theme’s css not working on another site
- Create Woocommerce product without creating api credentials
- var(–text-color) in style.scss works once but not twitch
- How to call a function from a shortcode function in an oop plugin
- How to trigger selected option from a clic. (variation product woocommerce)
- How to access index file in Block Themes?
- Custom Endpoint – Does it possible to use PUT method with WP API Rest?
- How Place a Custom Form Fields in a specific location on the User Profile Page?
- How to determine primary editor for a page/post
- How does one update complex options?