Download the PHP package joomla-ua/juimage without Composer

On this page you can find all versions of the php package joomla-ua/juimage. 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 juimage

JUImage v6

JUImage - library for render thumbs with support webp and avif.

Create thumbs for Joomla! extension or stand-alone use.

Demo (All thumbs)

Use in Joomla! Extension

Usage

Stand-alone

Composer Install

composer require joomla-ua/juimage

You can then later update using composer:

composer update

Code example

After installing, you need to require Composer's autoloader:

Global options Description
$root_path Root path for your site. Default define JPATH_BASE
$img_blank Path to default image. For example if image not found display default image noimage.png. Use also option error_image if image not found or broken (go to Option)

Joomla! Integration

Install

Install extention library (lib_juimage_v3.x.x.zip) using Joomla! Extension Manager.

Code example

Code for use in your extension.

or

WebP support

Use GD2 lib for webp thumbs:

WebP command Type Default Description
webp Boolean false If true add support WebP image. For this option use tag <picture>, see in example.

AVIF support

AVIF image format (requires PHP 8.1.0)

WebP command Type Default Description
avif Boolean false If true add support WebP image. For this option use tag <picture>. AVIF image format (requires PHP 8.1.0)

How to combine WebP and AVIF?

YouTube and Vimeo support

Youtube:

Vimeo:

Image size support

Options

Add option to this array:

Command Description
cache folder for thumbnails
error_image path to default image if image not found or broken
w max width of output thumbnail in pixels
h max height of output thumbnail in pixels
wp max width for portrait images
hp max height for portrait images
wl max width for landscape images
hl max height for landscape images
ws max width for square images
hs max height for square images
f output image format ("jpeg", "png", "gif", "webp" or "avif")
q JPEG compression (1=worst, 95=best, 75=default)
sx left side of source rectangle (default 0) (values 0 < sx < 1 represent percentage)
sy top side of source rectangle (default 0) (values 0 < sy < 1 represent percentage)
sw width of source rectangle (default fullwidth) (values 0 < sw < 1 represent percentage)
sh height of source rectangle (default fullheight) (values 0 < sh < 1 represent percentage)
zc zoom-crop. Will auto-crop off the larger dimension so that the image will fill the smaller dimension (requires both "w" and "h", overrides "iar", "far"). Set to "1" or "C" to zoom-crop towards the center, or set to "T", "B", "L", "R", "TL", "TR", "BL", "BR" to gravitate towards top/left/bottom/right directions (requies ImageMagick for values other than "C" or "1")
bg background hex color (default FFFFFF)
bc border hex color (default 000000)
xto EXIF Thumbnail Only - set to only extract EXIF thumbnail and not do any additional processing
ra Rotate by Angle: angle of rotation in degrees positive counterclockwise, negative, clockwise
ar Auto Rotate: set to "x" to use EXIF orientation stored by camera. Can also be set to "l" or "L" for landscape, or "p" or "P" for portrait. "\l" and "P" rotate the image clockwise, "L" and "p" rotate the image counter-clockwise.
sfn Source Frame Number - use this frame/page number for multi-frame/multi-page source images (GIF, TIFF, etc)
aoe Output Allow Enlarging - 1=on, 0=off. "far" and "iar" both override this and allow output larger than input)
iar Ignore Aspect Ratio - disable proportional resizing and stretch image to fit "h" & "w" (which must both be set). (1=on, 0=off) (overrides "far")
far Force Aspect Ratio - image will be created at size specified by "w" and "h" (which must both be set). Alignment: L=left,R=right,T=top,B=bottom,C=center. BL,BR,TL,TR use the appropriate direction if the image is landscape or portrait.
dpi Dots Per Inch - input DPI setting when importing from vector image format such as PDF, WMF, etc
sia Save Image As - default filename to save generated image as. Specify the base filename, the extension (eg: ".png") will be automatically added
maxb MAXimum Byte size - output quality is auto-set to fit thumbnail into "maxb" bytes (compression quality is adjusted for JPEG, bit depth is adjusted for PNG and GIF)

License

GNU General Public License version 3 or later; see LICENSE.md

Software used

JUImage is based on the phpThumb() Class (James Heinrich), and fast-image-size library (Marc Alexander).

Sponsors

JetBrains

Thanks to JetBrains for supporting the project through sponsoring some All Products Packs within their Free Open Source License program.


All versions of juimage with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
marc1706/fast-image-size Version 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 joomla-ua/juimage contains the following files

Loading the files please wait ....