Download the PHP package redfinch/redfinch-image-resize without Composer

On this page you can find all versions of the php package redfinch/redfinch-image-resize. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package redfinch-image-resize

WordPress Image Resize

WordPress can be difficult to work with when using images. Especially if you want to have multiple image sizes available for templates, the result is either putting the resizing responsibility on end users or having an extremely large uploads directory.

This plugin aims to solve this issue, simply and without any additional libraries. It will automatically add your custom sizes to the Attachment meta data which means on deletion, all of the arbitrary sizes will be removed as well.

Installation

If you are using roots/bedrock or a variant of this, the installation is simply to run composer require redfinch/redfinch-image-resize.

To install manually go to the releases page and download the latest version. Unzip the file into your WordPress plugins directory.

Using the plugin

The plugin is aimed at developers and therefore there is no admin interface. The plugin exposes four main functions:

redfinch_resize_image

This resizes an image proportionally to fit X and Y values.

redfinch_resize_post_thumbnail

This is a helper function to resize the featured image of the current post. You can optionally pass through a WP_Post or post ID value as the last parameter to display the image from a specific post or page.

redfinch_crop_image

This is very similar to the resize() function, however it will crop the image to fit ensuring that the image is always going to be the given dimensions.

redfinch_crop_post_thumbnail

Identical to resize(), instead ensuring the featured image is always the given dimensions. You can optionally pass through a WP_Post or post ID value as the last parameter to display the image from a specific post or page.

Hooks

Filters

redfinch_image_resize_get_path

Returns the generated path to the resized image. The value passed through is a string and it expects a string to be returned.

redfinch_image_resize_get_url

Returns the generated URL to the resized image. The value passed through is a string and it expects a string to be returned.

Actions

redfinch_image_resize_pre_generate_image

This action triggers before the resize() method is called on the WP_Image_Editor object. The single parameter is the Image Editor instance.

redfinch_image_resize_post_generate_image

This action triggers after the resize() method is called on the WP_Image_Editor object. The single parameter is the Image Editor instance.


All versions of redfinch-image-resize with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package redfinch/redfinch-image-resize contains the following files

Loading the files please wait ....