next_image_link()WP 2.5.0

Displays next image link that has the same post parent.

No Hooks.

Return

null. Nothing (null).

Usage

next_image_link( $size, $text );
$size(string|int[])
Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order).
Default: 'thumbnail'
$text(string|false)
Link text.
Default: false

Examples

0

#1 Basic example

<div class="alignright"><?php next_image_link() ?></div>
0

#2 More examples

See the identical function previous_image_link().

Changelog

Since 2.5.0 Introduced.

next_image_link() code WP 6.4.3

function next_image_link( $size = 'thumbnail', $text = false ) {
	echo get_next_image_link( $size, $text );
}