Koha-clms/koha-tmpl
Hammat Wele 63a1924b27
Bug 33857: Avoid increasing file size while uploading image
This patch prevents image size from increasing while uploading by
keeping the original image format

Test plan:

1. Download the attached image large-image.jpg
  --> It should be ~170kB and 1000×1500 pixels
2. Enable LocalCoverImages in System preferences
3. Find a record in the staff interface
4. Go to "Images" tab
5. Upload large-image.jpg image
   5.1. Click on "Upload"
   5.2. Click on "Drop files here or click to select a file"
   5.3. Choose picture (large-image.jpg)
   5.4. Click on "Process images"
6. Click on image for large image
7. Right-click on the image and save it
  --> It is ~930kB and 600x900 pixels

8. Apply the patch and flush browser cache (Crtl+F5) to update js files
9. Detele the previous uploaded image
10. Repeat step 3, 4, 5, 6, 7
   --> The image is ~92kB and 600x900 pixels
11. prove t/db_dependent/Koha/CoverImages.t
   --> All tests should be successful

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 09:55:52 +01:00
..
intranet-tmpl Bug 33857: Avoid increasing file size while uploading image 2026-03-24 09:55:52 +01:00
opac-tmpl Bug 41479: (follow-up) Remove bakertaylorimages.js 2026-03-24 07:50:32 +01:00