Download the PHP package b13/picture without Composer

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

CI

b13 Image View Helper

What it does

The b13 image view helper is a massive extension of the regular Fluid image ViewHelper. Basically it processes images and renders a single src element or a picture element depending on the specified configuration.

Installation

Install the extension using composer: composer req b13/picture.

Include the TypoScript within your main template:

Use Fluid Namespace B13\Picture

Use a proper configured Fluid template adding the namespace when using this ViewHelper:

TypoScript setup

See EXT:picture/Configuration/TypoScript/setup.typoscript for possible configuration options (key: plugin.tx_picture):

TypoScript Configuration option Description
addWebp Add webp alternative image files as sources.
default: 0
useRetina Add retina (2x) version of all images as sizes variants.
default: 0
lossless Enable lossless compression for webp images.
default: 0
retina Use custom or multiple multipliers for calculating retina image variants.
_default:
retina.2 = 2x
Only works in combination with useRetina = 1
breakpoints Use named breakpoints for easier markup of different image sizes for one picture element.
default: empty.
lazyLoading Use the loading attribute with images. See Browser Native Lazy Loading by Default
default: {$types.content.image.lazyLoading}

Attributes

All from f:image

Our image ViewHelper extends from the Fluid Image ViewHelper, so it has all the same attributes, including:

useRetina

If useRetina is set and not further specified in TypoScript setup, the corresponding img tag's or source tag’s attribute srcset is extended by a 2x retina version of the image.

addWebp

Adds rendering of additional images in webp format. If it is specified without a given sources attribute, it renders a picture tag instead of a single img tag in order to maintain a browser fallback. If it is specified together with sources it adds an additional source tag above any source tag rendered by a given sources element.

lossless

Enable lossless compression for webp images. If you find your webp images lacking in quality compared to jpg/png images, enable this option to overwrite default settings for ImageMagick/GraphicsMagick.

variants and sizes

Adds multiple variants of an image with different image sizes, optionally add a sizes-attribute to image tags:

This can also be part of the sources-Array (see below).

sources

Sources must be notated as array. For each element given a source tag is rendered. It accepts the same attributes as the fluid image view helper. The source tags are rendered in the same ordering as specified in the array. If you do not specify additional TypoScript settings, any key can be used.

pictureClass

Add a CSS class used for the picture element (if rendered using <picture>).

TypoScript Settings

In general

The following attributes can also be set in TypoScript as defaults for your whole site: addWebp, useRetina. A default setting can be overridden for each usage of the ViewHelper by setting the corresponding attribute.

retina

The retina option enables an extension of the default behaviour of the useRetina attribute. If retina is set, an array should be specified with the multiplier for the image size as key, and the multiplier value output in the corresponding tag.

breakpoints

With the array breakpoints you can use those settings by using keys in your Fluid template (instead of adding media queries for every key in your sources array). It simply adds a media query for min-width.

Test rendering for demonstration purposes

You can include a test configuration to see the ViewHelper in your test instance frontend in action:

@import 'EXT:picture/Configuration/TypoScript/test.typoscript'

This configuration enables frontend rendering of the test file with lots of different rendering examples using the page type 1573387706874.

https://your.local.test.environment/?type=1573387706874

will render a page with different options to showcase code examples. This is intended for demonstration and testing purposes, not meant for your production environment.

Credits

This extension was created by Andreas Hämmerl and David Steeb in 2019 for b13 GmbH, Stuttgart.

Find more TYPO3 extensions we have developed that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices ensuring long-term performance, reliability, and results in all our code.


All versions of picture with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ~8.0
typo3/cms-fluid Version ^10.4 || ^11.5 || ^12.4
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/picture contains the following files

Loading the files please wait ....