image-style-preview.html.twig

Default theme implementation to display a preview of an image style. Available variables: style_id: The ID of the image style. style_name: The name of the image style. cache_bypass: A timestamp token used to avoid browser caching of images. original: An associative array containing: url: The URL of the original image. width: The width in pixels of the original image. height: The height in pixels of the original image. rendered: The render array for the original image. derivative: An a

image-scale-summary.html.twig

Default theme implementation for a summary of an image scale effect. Available variables: data: The current configuration for this resize effect, including: width: The width of the resized image. height: The height of the resized image. upscale: If images larger than their original size can scale. effect: The effect information, including: id: The effect identifier. label: The effect name. description: The effect description. File core/modules/image/templates/image-scale-summary.ht

image-rotate-summary.html.twig

Default theme implementation for a summary of an image rotate effect. Available variables: data: The current configuration for this resize effect, including: degrees: Degrees to rotate the image, positive values will rotate the image clockwise, negative values counter-clockwise. bgcolor: The hex background color of the new areas created as consequence of rotation. random: If the rotation angle is randomized. effect: The effect information, including: id: The effect identifier. label: Th

image-resize-summary.html.twig

Default theme implementation for a summary of an image resize effect. Available variables: data: The current configuration for this resize effect, including: width: The width of the resized image. height: The height of the resized image. effect: The effect information, including: id: The effect identifier. label: The effect name. description: The effect description. File core/modules/image/templates/image-resize-summary.html.twig Related topics Theme system overview Functions and

image-formatter.html.twig

Default theme implementation to display a formatted image field. Available variables: image: A collection of image data. image_style: An optional image style. url: An optional URL the image can be linked to. See also template_preprocess_image_formatter() File core/modules/image/templates/image-formatter.html.twig Related topics Theme system overview Functions and templates for the user interface that themes can override.

image-crop-summary.html.twig

Default theme implementation for a summary of an image crop effect. Available variables: data: The current configuration for this resize effect, including: width: The width of the resized image. height: The height of the resized image. anchor: The part of the image that will be retained after cropping. anchor_label: The translated label of the crop anchor. effect: The effect information, including: id: The effect identifier. label: The effect name. description: The effect description.

image-anchor.html.twig

Default theme implementation for a 3x3 grid of checkboxes for image anchors. Available variables: table: HTML for the table of image anchors. See also template_preprocess_image_anchor() File core/modules/image/templates/image-anchor.html.twig Related topics Theme system overview Functions and templates for the user interface that themes can override.

Image toolkits

Functions for image file manipulations. Drupal's image toolkits provide an abstraction layer for common image file manipulations like scaling, cropping, and rotating. The abstraction frees module authors from the need to support multiple image libraries, and it allows site administrators to choose the library that's best for them. PHP includes the GD library by default so a GD toolkit is installed with Drupal. Other toolkits like ImageMagick are available from contrib modules. GD works well for

Image

Defines an image object to represent an image file. Hierarchy class \Drupal\Core\Image\Image implements ImageInterface See also \Drupal\Core\ImageToolkit\ImageToolkitInterface \Drupal\image\ImageEffectInterface Related topics Image toolkits Functions for image file manipulations. File core/lib/Drupal/Core/Image/Image.php, line 15 Namespace Drupal\Core\Image Members Name Modifiers Type Description Image::$fileSize protected property File size in bytes. Image::$source

Image

Provides helpers to operate on images. Hierarchy class \Drupal\Component\Utility\Image Related topics Utility classes and functions Overview of utility classes and functions for developers. File core/lib/Drupal/Component/Utility/Image.php, line 10 Namespace Drupal\Component\Utility Members Name Modifiers Type Description Image::scaleDimensions public static function Scales image dimensions while maintaining aspect ratio.