<?php
use Onvardgmbh\WpImage;
$img = WpImage::find( $post_id );
?>
<img src="<?= $img->size( 'custom_size' ); ?>" alt="<?= $img->alt(); ?>">
Returns: New WpImage
-object
$post
: Post ID of an image
Returns: URL of the image, scaled and/or cropped to the specified size
$size
: Image size name; One of the built-in "thumbnail", "small", "medium", "full", or custom size registered withadd_image_size
Returns: Alt text for the image
Returns: Caption for the image
Returns: Description for the image
Returns: Permalink for the image
Returns: Title text for the image