History log of /dokuwiki/_test/tests/lib/exe/fetch_imagetoken.test.php (Results 1 – 6 of 6)
Revision Date Author Comments
# dd9e8e5e 23-Apr-2026 Andreas Gohr <andi@splitbrain.org>

fix EXIF-rotated images shown cropped in previews, closes #4482

JPEGs with EXIF orientation 5/6/7/8 were rendered cropped in the
mediamanager detail view, the image diff view and the fullscreen
deta

fix EXIF-rotated images shown cropped in previews, closes #4482

JPEGs with EXIF orientation 5/6/7/8 were rendered cropped in the
mediamanager detail view, the image diff view and the fullscreen
detail page: getimagesize() / JpegMeta report raw (rotation-unaware)
pixel dimensions, and passing both w and h to fetch.php defaults to
center-crop.

- Bump splitbrain/slika to 1.1, which ships ImageInfo: a rotation-
aware, metadata-only dimension simulator mirroring Adapter's
fluent API (autorotate/resize/crop).
- Add fit=1 to fetch.php: when both w and h are given, route to
media_resize_image() (bbox fit) instead of media_crop_image().
Token hashes only (id, w, h) so existing tokens stay valid.
- Add MediaFile::getDisplayDimensions($w, $h, $crop) which delegates
to ImageInfo and returns the dims fetch.php would produce.
- Add Display::getDetailHtml() and retire media_preview() / the old
media_image_preview_size() helper. media_tab_view and MediaDiff
now share the Display-based renderer.
- Rewrite tpl_img() (lib/tpl/*/detail.php) to use MediaFile dims +
fit=1 URL; drops the manual ratio math.
- Tests: MediaFileTest covers the dims math, DisplayTest covers the
detail-view HTML (rotated dims, rev-vs-timestamp URL selection,
structure), fetch_imagetoken gains a fit-token compat test.
Fixture _test/data/media/wiki/exif-orient-6.jpg: 20x30 JPEG with
EXIF orientation 6.

show more ...


# e32b1b0f 01-Oct-2020 Syntaxseed <825423+syntaxseed@users.noreply.github.com>

Fix PHPUnit fatal errors compatibility with void.


# 1c33cec3 04-Feb-2021 Andreas Gohr <andi@splitbrain.org>

add needed type hints for phpunit8

This will break a lot of plugin tests, but can't be avoided


# a38a6f25 21-May-2013 Klap-in <klapinklapin@gmail.com>

fix some minor typos in fetch_imagetoken.test.php


# 3e8bad3a 22-Mar-2013 Christopher Smith <chris@jalakai.co.uk>

add some dependency checks with test skips to fetch tests and tests which use TestResponse::headers


# f56bb251 22-Mar-2013 Christopher Smith <chris@jalakai.co.uk>

add test for fetch using image tokens