wpessential/wpessential-images

WPEssential Images helping for the images registry in WordPress.

2.0.2 2025-03-19 14:00 UTC

This package is auto-updated.

Last update: 2025-05-19 14:19:33 UTC


README

Help to register the images in WordPress.

composer require wpessential/wpessential-images

Add the single image to WordPress registry

$prefix ='wpe';
$images = \WPEssential\Library\Images::make( $prefix );
$images->add([
	'size'  => [ 'w' => 1980, 'h' => 9999 ],
	'croup' => true
]);
$images->init();

Add the multiple images to WordPress registry

$prefix ='wpe';
$images = \WPEssential\Library\Images::make( $prefix );
$images->add([
	[
		'size'  => [ 'w' => 1920, 'h' => 1080 ],
		'croup' => true
	],
	[
		'size'  => [ 'w' => 1980, 'h' => 9999 ],
		'croup' => true
	]
]);
$images->init();

Remove the single image from WordPress registry

$prefix ='wpe';
$images = \WPEssential\Library\Images::make( $prefix );
$images->remove('1920x1080');
$images->init();

Remove the multiple image from WordPress registry

$prefix ='wpe';
$images = \WPEssential\Library\Images::make( $prefix );
$images->remove(['1920x1080']);
$images->init();