Download the PHP package b13/vh_imagedata without Composer

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

EXT:vh_imagedata

Viewhelper to build custom <img>-Tag

This viewhelper calculates an image based on <f:image> without rendering an image tag, making the data available in the content of the viewhelper for manual use or rendering custom image tags. The rendering takes all crop settings into account.

Basic useage example

Allowed attributes

The following attributes can be passed to the ViewHelper. All attributes normally allowed for f:image can be passed but not all make sense.

Argument Type Info
as string Name of variable to create. Defaults to imageData
alt string Specifies an alternate text for an image'
title string Tooltip text of element
src string a path to a file, a combined FAL identifier or an uid (int). If $treatIdAsReference is set, the integer is considered the uid of the sys_file_reference record. If you already got a FAL object, consider using the $image parameter instead
treatIdAsReference bool given src argument is a sys_file_reference record
image object a FAL object
crop string bool overrule cropping of image (setting to FALSE disables the cropping set in FileReference
cropVariant string select a cropping variant, in case multiple croppings have been specified or stored in FileReference
width string width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
height string height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
minWidth int minimum width of the image
minHeight int minimum width of the image
maxWidth int minimum width of the image
maxHeight int minimum width of the image
absolute bool Force absolute URL
value mixed Value to assign. If not in arguments then taken from tag content

Returned data

The ViewHelper returns an array with all the image data as {imageData} or the variable name you set in argument as. The array contains these values:

Key Info
width Width of the rendered image
height Height of the rendered image
uri URL of the image rendered
alt Alt tag for the image, taken from the sys_file_record, the sys_file_reference or from the "alt"-argument of the viewhelper
title Title tag for the image, taken from the sys_file_record, the sys_file_reference or from the "title"-argument of the viewhelper
ratio The ratio of the cropped/rendered image (width / height), meaning 1.77777 for an image with 16:9 ratio
heightRatio The ratio of height to width, for use in inline styles of containers for responsive images
link Value of the link field from sys_file_reference
processingInstructions Original processing instructions used for image rendering (including crop-values as array)
processedImage The processed file
originalImage The original file

Installing

Use Composer to add to your project:

composer require b13/vh_imagedata

Set the namespace the ViewHelper in your Fluid template where needed:


All versions of vh_imagedata with dependencies

PHP Build Version
Package Version
No informations.
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 b13/vh_imagedata contains the following files

Loading the files please wait ....