Image_Processing_Queue::get_image_url( int $post_id, array $size )
Get image URL for a specific context in a theme, specifying the exact size for the image. If the image size does not currently exist, it is queued for creation by a background process. Example:
Description
For echoing – echo ipq_get_theme_image_url( 1353, array( 600, 400, false ) );
Parameters
- $post_id
-
(int) (Required)
- $size
-
(array) (Required)
Return
(string)
Source
File: classes/library/image-processing-queue/includes/class-image-processing-queue.php
public function get_image_url( $post_id, $size ) { $this->process_image( $post_id, array( $size ) ); $size = self::get_size_name( $size ); $src = wp_get_attachment_image_src( $post_id, $size ); if ( isset( $src[0] ) ) { return $src[0]; } return ''; }
Expand full source code Collapse full source code View on Trac