Tiger_Media_Image
@api
Tiger_Media_Image — GD-backed image variant generation (thumbnails / sized copies).
OPTIONAL: everything degrades when GD is absent (hasGd()/supports() return false) — the upload pipeline then falls back to a browser-generated thumbnail. When GD IS present it produces the configured presets server-side.
Rules (per the product spec): contain, never crop (scale to fit the longest edge), never upscale (a preset larger than the source is skipped — the original serves that size), preserve transparency (PNG/WebP), auto-rotate from EXIF (JPEG), and favor quality over compression for the lossy formats.
Methods
hasGd()
hasGd()
Is GD available at all?
Returns bool — true when the GD extension and truecolor support are present
supports()
supports($mime)
Can we process this MIME with the GD build present?
$mimestring— the MIME type to test
Returns bool — true when GD can decode/encode this MIME
variants()
variants($sourcePath, $mime, array $presets, $quality = 90)
Generate downscaled variants to temp files.
$sourcePathstring— the original on disk$mimestring$presetsarray— ['thumbnail'=>200, 'small'=>640, …] (longest-edge px)$qualityint— JPEG/WebP quality (0-100; high = better)
Returns array — ['thumbnail'=>['path'=>tmp,'width'=>w,'height'=>h,'mime'=>mime], …]