History log of /dokuwiki/inc/Cache/CacheImageMod.php (Results 1 – 4 of 4)
Revision Date Author Comments
# c3a14f67 06-Jul-2026 Andreas Gohr <gohr@cosmocode.de>

fix(media): don't upscale small images in the detail previews

The detail page, media manager and media diff requested a bounding-box
resize at the full box size, so an image smaller than the box was

fix(media): don't upscale small images in the detail previews

The detail page, media manager and media diff requested a bounding-box
resize at the full box size, so an image smaller than the box was enlarged
and fetch.php generated and cached the upscaled copy.

slika 1.2 adds an $upscale option to resize/crop. getDisplayDimensions()
now takes a $fit flag mirroring fetch.php one to one and predicts the
matching no-upscale dimensions, media_resize_image()/media_mod_image()
forward $upscale, and fetch.php disables upscaling for fit=1 requests.
In-page image scaling is unchanged.

show more ...


# d4f83172 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

code style: line breaks


# 8c7c53b0 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

codestyle adjustments: class declaration braces


# b021f0b4 27-Jan-2022 Andreas Gohr <andi@splitbrain.org>

correctly (re)cache modified images

The previous code used to cache the result of resize and crop image
operations indefinitely. They only time these caches were refreshed were
when the original sou

correctly (re)cache modified images

The previous code used to cache the result of resize and crop image
operations indefinitely. They only time these caches were refreshed were
when the original source changed.

This meant that changes in configuration (eg. the image quality setting)
were never applied to existing images, neither were changes/improvements
in the resizing code.

This patch introduces a new Cache class for these kind of modification
results.

It also removes more duplicated code in media_resize_image and
media_crop_image. Future refactorings may move this code into
File\MediaFile

This code should also fix currently weird results for plugin and
screenshot in the extension manager - TBH I am not 100% sure what
happened there but refreshing the cache once seems to solve the problem.

show more ...