fix EXIF-rotated images shown cropped in previews, closes #4482JPEGs with EXIF orientation 5/6/7/8 were rendered cropped in themediamanager detail view, the image diff view and the fullscreendeta
fix EXIF-rotated images shown cropped in previews, closes #4482JPEGs with EXIF orientation 5/6/7/8 were rendered cropped in themediamanager detail view, the image diff view and the fullscreendetail page: getimagesize() / JpegMeta report raw (rotation-unaware)pixel dimensions, and passing both w and h to fetch.php defaults tocenter-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 ...
Revert "use a dispatcher to access static image files"This reverts commit 944e9ba7254387adb60f253b0d8796f2276096b1.It was accidentally pused to master before review. A PR with a revertfor the re
Revert "use a dispatcher to access static image files"This reverts commit 944e9ba7254387adb60f253b0d8796f2276096b1.It was accidentally pused to master before review. A PR with a revertfor the revert will be pushed shortly.
use a dispatcher to access static image filesThis makes it possible to replace default images in an update safe way.It also addresses the issue raised in dokuwiki/docker#16A .htaccess rewrite ca
use a dispatcher to access static image filesThis makes it possible to replace default images in an update safe way.It also addresses the issue raised in dokuwiki/docker#16A .htaccess rewrite catches any direct accesses that might come in fromplugins.
Use str_starts_with/str_ends_with
code style: line breaks
codestyle adjustments: class declaration braces
Apply rector fixes to inc/Ui
minor SVG improvements* never try to use slika to resize SVGs - let the browser do it* use object-fit:cover for all images - this properly crops inside the browser if the backend didn't (like fo
minor SVG improvements* never try to use slika to resize SVGs - let the browser do it* use object-fit:cover for all images - this properly crops inside the browser if the backend didn't (like for SVGs). currently dokuwiki template only - might be worth moving to default styles* show previews for SVGs in media manager
rename namespace Media to FileThis is a bit more generic and allows us to have additional Fileabstractions in here later.
readded $jump mechanism, removed unused functions
fix entity definition
reenable the option to display a relative namespace for media filesThis is used when searching for media files
make use of the new media file classesThis just crudely replaces the calls to the old functions with usage ofthe new classes. This however already works and makes (manual) testingof these classes
make use of the new media file classesThis just crudely replaces the calls to the old functions with usage ofthe new classes. This however already works and makes (manual) testingof these classes easier.Next steps: remove the old media_printfile and media_printfile_thumbsmethods and fix/drop/replace the tests depending on them. search_mediamight be obsolete, too already.For search results the display classes need to show full namespaces.This needs to be fixed again. No idea about the jump mechanism, yet.
first go a refactoring the media managerFor now this only adds code. This takes care of encapsulating media fileinformation and has some UI classes to display those files in thefullscreen media m
first go a refactoring the media managerFor now this only adds code. This takes care of encapsulating media fileinformation and has some UI classes to display those files in thefullscreen media manager and the popup.The code is untested and not integrated to run, yet. Next step is toreplace the parts in the media manager to call this new code (and fixany bugs).I tried not to change much HTML yet. This can be done later. For now thegoal is to just make it run again.