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
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- How can I add an image upload field directly to a custom write panel?
- Creating a table in the admin-style?
- What process do you use for WordPress development? [closed]
- On the WordPress Admin section how do I link to submenu pages created for a plugin?
- How to return only certain fields using get_posts()
- Where to put third party PHP library?
- Add a new tab to WordPress Plugin install Listing
- Scheduled events disappear from events queue
- How to integrate a PHP webmail script into the backend of WordPress?
- Where is it better to start learning how to develop for WordPress?
- How to log plugin errors to plugin error_log file
- Custom Post Type Link from Plugin
- How to Get a List of Sub Blogs without Using get_blog_list()?
- Is there any way to test if a function running only on plugin update is successfully running?
- Using wp_cron with custom time interval and the register activation hook
- Conditional check to see if a bootstrap.css is included in a theme
- Throw 403 in a plugin [duplicate]
- WordPress multisite apply different options over each site from same plugin
- Using ob_start() in plugin
- Create Element From Dynamic HTML String [closed]
- How can I view all WP generated thumbnails in Media Manager?
- Only allow plugin to be activated on root site of multisite
- what is the best practice for including ‘wp-includes’ classes
- Custom Plugin Database relations
- Save user-specific options in WordPress admin
- Load page template with custom content using a plugin
- How to put placeholder text in the main post input area?
- How can i get the title i specified in add_options_page for my header
- Is there a way to list tags order by post_meta field
- how to redirect to another post without getting headers already sent error?
- Redirect user to a particular link in 10 seconds after using wp_die
- Change template dynamically
- add a class when login
- An echo line in a transition_post_status action leads to “cannot modify header information – headers already sent by”
- Proper way to run wp_query from inside a plugin
- Programmatically detect if wp-cron is disabled?
- Widget is to be compatible with all themes
- How to create a table with filters for my plugin
- Maximum lifetime for nonce
- Passing nonce at admin menu link
- wp_insert_user() function password never match
- How to setAttributes in Gutenberg block?
- Preview plugin store details
- Prevent third party plugin’s admin page access based on user type
- Get attachments from a post
- I have 2 plugins using the same wp_login action hook and one is not working
- TEMPLATEPATH without the theme name? No THEMEPATH constant?
- Using a multiple element in widget form
- Update Data parameter of a wp_localize_script() call
- Download button in a plugin’s settings page
- Quasi-custom API Call Plugin
- Data not insert and update through ajax and jQuery in admin page?
- Adding custom stylesheet into header.php using a plugin
- Developing the save function in Gutenberg blocks
- Creating an installation zip file
- update_callback is not working in register_rest_field
- How to create ShortCode
- Detect change in site_url and home_url
- Reporting errors in a shortcode plugin
- shortcode tags not working in do_shortcode
- Why is the form not updating when I select a new sector from the list?
- How to change a field in database through a submit button or Checkbox? [closed]
- How do I add a menu item to a Pods admin menu?
- Is there a way to add a link with add_post_meta?
- How to Show Category List With Corresponding Links?
- Import images remotly run through timeout error
- How to make every image title equal to alt text(wordpress/woocommerce)?
- Load specific page when a custom URL is hit
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- How do I add a 5 digit ZIP code validation to a Contact7 form?
- HTMLCollection not counting right in editor? / for loop not working on elements in DOM
- How can we stop showing short code in create or edit post section
- Getting products information, in woocommerce based on products ID
- Delete Plugin Options with Verify
- How can I measure CPU and RAM used by my theme or plugin
- set a custom post type to a taxonomy term programmatically in metabox
- How to display properly exception or echo string after posting in plugin?
- How to create custom frontend php page via plugin
- How can I add recent posts to menu like mashable
- Changing upload directory for plugin uploads only
- How do I query posts and have their related taxonomies returned in the results?
- On one of my sites a file is shown as 404 but the file IS there
- Update option hook not firing
- $_GET vs get_query_var()
- Extend WP_List_Table class – Edit wp_usermeta – WPPB.me Boilerplate – Action error
- How will i add an option under customizer the event calendar section?
- Return custom product in ajax call loop
- Is using upgrader_process_complete the correct way to perform plugin updates?