PHPackages                             shortlist-digital/yoimages - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. shortlist-digital/yoimages

ActiveLibrary

shortlist-digital/yoimages
==========================

0.1.5(9y ago)00PHP

Since Jan 6Pushed 1y ago9 watchersCompare

[ Source](https://github.com/shortlist-digital/yoimages)[ Packagist](https://packagist.org/packages/shortlist-digital/yoimages)[ RSS](/packages/shortlist-digital-yoimages/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (16)Used By (0)

YoImages
========

[](#yoimages)

Better image handling capabilities for Wordpress. All you need to handle your images in Wordpress in one plugin.

YoImages adds the following functional enhancements to the Wordpress admin interface:

- image cropping tools: [demo video](https://www.youtube.com/watch?v=nGkn7A8gA6M). No more images cropped wrong, you can choose now what to display and even replace the entire image for a specific crop size if the orginal image doesn't fit. Crop at a lower quality to speed up page loading. Create croppings in retina format too.
- image SEO hooks: [demo video](https://www.youtube.com/watch?v=ZMv4Pqp4HQA). Images are important for SEO but are never optimized enough. With YoImages you can automatically optimize images for Search Engines. No more alt tag missing or non informative titles or file names. Google can't see the image (yet) but, can read its attributes.
- free stock photos search: [demo video](https://www.youtube.com/watch?v=QH9uzQ2hE_c). Search and upload royalty free photos from the web directly into the Wordpress Admin interface.

Image cropping tools
--------------------

[](#image-cropping-tools)

YoImages' cropping tools let you crop manually each cropping format that your theme defines: this feature gives you full control on how cropped versions of your images will look like.

You can choose to replace the source image for some specific formats.

From the image cropping interface you can change the image quality for each cropped format.

YoImages cropping is retina friendly: if you are using a retina plugin that uses the standard @2x as file naming convention when creating retina images from source (e.g. [WP Retina 2x](https://wordpress.org/plugins/wp-retina-2x/)) you can enable the retina friendly cropping option in YoImages' settings page and the manual crops will be created in retina format too.

Image SEO hooks
---------------

[](#image-seo-hooks)

YoImages' SEO hooks automate image metadata (title, alt and filename) filling on image upload and on post (or page) saving.

Each image SEO hook can be enabled or disabled individually and it works on any image that is child of a post or page such as the featured image and images or galleries added into the post WYSIWYG area.

You are free to define metadata values by using fixed texts and the following variables from the post/page that contains an image:

- parent post title
- parent post type
- parent post tags
- parent post categories
- parent post author username
- parent post author first name
- parent post author last name
- site name

#### Adding your own custom hooks

[](#adding-your-own-custom-hooks)

YoImages' SEO hooks work on post saving or updating time and updates post's related images metadata. The *yoimg\_seo\_images\_to\_update* filter allows to add other images to be considered, for example images linked to the post via custom fields.

This filter takes in input the array of the images' ids linked to a post and the post id itself.

The following example shows how YoImages plugin uses this filter to have the featured image metadata updated:

```
function yoimg_imgseo_add_featured_image( $ids, $post_id ) {
	$post_thumbnail_id = get_post_thumbnail_id( $post_id );
	array_push( $ids, $post_thumbnail_id );
	return $ids;
}
add_filter('yoimg_seo_images_to_update', 'yoimg_imgseo_add_featured_image', 10, 2);
```

#### Adding your own custom variables

[](#adding-your-own-custom-variables)

To add a new variable you have to hook two filters:

- *yoimg\_seo\_expressions*
- *yoimg\_supported\_expressions*

*yoimg\_seo\_expressions* is the filter that allows variables substitutions into the string being associated with the image metadata.

This filter makes use of the parent post object and of the attachment image post.

The following example shows how this filter is used for the *\[title\]* variable:

```
function example_expression_title( $result, $attachment, $parent ) {
	if ( strpos( $result, '[title]' ) !== FALSE ) {
		$result = str_replace( '[title]', $parent->post_title, $result );
	}
	return $result;
}
add_filter('yoimg_seo_expressions', 'example_expression_title', 10, 3);
```

*yoimg\_supported\_expressions* is the filter that defines which variables expressions are supported.

This filter takes in input an array of already supported variables and adds new variables to this array.

The following example shows how to add support for the *\[title\]* variable:

```
function example_supported_expressions( $supported_expressions ) {
	if ( ! $supported_expressions ) {
		$supported_expressions = array();
	}
	array_push( $supported_expressions, '[title]' );
	return $supported_expressions;
}
add_filter( 'yoimg_supported_expressions', 'example_supported_expressions', 10, 1 );
```

Free stock photos search
------------------------

[](#free-stock-photos-search)

YoImages' free stock photos search feature lets you perform a free term search directly from the Wordpress admin interface in the following databases:

- [splashbase.co](http://www.splashbase.co/)
- [unsplash.com](https://unsplash.com/)

The photos you select are uploaded into your Wordpress site and optimized with YoImages' crop and SEO tools.

Photos from splashbase.co and unsplash.com are hi-res and free to use, but we recommend checking copyright details for each photo you choose.

#### Adding new free stock photos search providers

[](#adding-new-free-stock-photos-search-providers)

Implement and register a javascript client for the free stock photos search provider you want to add. To do that, you can use these implementations as reference: [providers](https://github.com/sirulli/yoimages-search/blob/master/inc/js/providers)

Then add your provider's javascript client implementation via the "yoimg\_search\_providers" filter:

```
function my_search_provider( $search_providers ) {
       array_push( $search_providers, array(
			'js' => MY_PLUGIN_URL . '/my-provider-client.js',
			'url' => 'http://my.provider.url/',
			'name' => 'MyProviderName'
	   ) );
       return $search_providers;
}
add_filter( 'yoimg_search_providers', 'my_search_provider' );
```

Install YoImages from sources
-----------------------------

[](#install-yoimages-from-sources)

YoImages is a modular Wordpress plugin built with [Composer](https://getcomposer.org/).

YoImages includes the following modules:

- [YoImages Commons](https://github.com/sirulli/yoimages-commons)
- [YoImages Crop](https://github.com/sirulli/yoimages-crop)
- [YoImages SEO](https://github.com/sirulli/yoimages-seo)
- [YoImages Search](https://github.com/sirulli/yoimages-search)

To install it from sources go to your Wordpress plugin directory via terminal and there:

```
git clone https://github.com/sirulli/yoimages.git
cd yoimages
curl -sS https://getcomposer.org/installer | php
php composer.phar install
```

To update your installed YoImages plugin from sources go to Wordpress plugin directory via terminal and there:

```
cd yoimages
git pull
php composer.phar update
```

Languages supported
-------------------

[](#languages-supported)

Primary: English

Translations: Italian, German, Dutch, French, Polish

Translations are managed with [poeditor.com](https://poeditor.com/projects/view?id=25799).

Future features
---------------

[](#future-features)

Future features to implement:

- simple built-in image editor (effects, editing, color optimization)
- image gallery templates

Feel free to report bugs or request new features [here](https://github.com/sirulli/yoimages/issues).

How to contribute
-----------------

[](#how-to-contribute)

Credits
-------

[](#credits)

Thanks to Fengyuan Chen for his [jQuery Image Cropper](http://fengyuanchen.github.io/cropper/) plugin.

Thanks to [wp-fred](https://profiles.wordpress.org/wp-fred-1/) for the Dutch translations of the plugin and for suggesting and designing the "user-friendly names" feature for crop formats.

Thanks to [Maxime Lafontaine](http://www.maximelafontaine.net/) for the French translations of the plugin.

Thanks to [Thomas Meyer](https://github.com/tmconnect/) for code contributions and fixes to the German translations.

Thanks to [Robert Vermeulen](https://github.com/robert388) for adding better support for metadata, support for WP-CLI commands and making YoImages compatible with Regenerate Thumbnails plugin.

Thanks to [Elliot Coad](https://github.com/ecoad) for adding the firing of an action after cropping.

Thanks to [odie2](https://github.com/odie2/) for code contributions and for the Polish translations of the plugin.

Thanks to [Ben Bowler](https://github.com/benbowler) for his code contributions.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~71 days

Recently: every ~142 days

Total

11

Last Release

3423d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61ad7e6bf7e888532cab85057b18648b093e470d0f2277548b302ac494de9e31?d=identicon)[shortlist-digital](/maintainers/shortlist-digital)

---

Top Contributors

[![fagia](https://avatars.githubusercontent.com/u/8018046?v=4)](https://github.com/fagia "fagia (156 commits)")[![ecoad](https://avatars.githubusercontent.com/u/596528?v=4)](https://github.com/ecoad "ecoad (6 commits)")[![ferrbea](https://avatars.githubusercontent.com/u/5435160?v=4)](https://github.com/ferrbea "ferrbea (4 commits)")[![benbowler](https://avatars.githubusercontent.com/u/119352?v=4)](https://github.com/benbowler "benbowler (2 commits)")[![odie2](https://avatars.githubusercontent.com/u/9401878?v=4)](https://github.com/odie2 "odie2 (1 commits)")

### Embed Badge

![Health badge](/badges/shortlist-digital-yoimages/health.svg)

```
[![Health](https://phpackages.com/badges/shortlist-digital-yoimages/health.svg)](https://phpackages.com/packages/shortlist-digital-yoimages)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
