Bug 39002

Summary: Unable to import XPM local cover image
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: Staff interfaceAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Caroline Cyr La Rose 2025-01-30 16:13:52 UTC
I stumbled upon this by accident, I don't know if this functionality is used very much, or at all.

Note: I used the image teapot.xpm on this page https://people.math.sc.edu/Burkardt/data/xpm/xpm.html to test. I also tried to make one with GIMP with the same result.

To recreate:
1. Enable LocalCoverImages
   1.1. Go to Administration > System preferences
   1.2. Search for LocalCoverImages
   1.3. Change the value to 'Show'
   1.4. Click 'Save all Enhanced content preferences'

2. Import an XPM image as a cover image
   2.1. Download the teapot.xpm image from the site above, or another .xpm image
   2.2. Search for a record and go to the detailed page
   2.3. Click the 'Images (0)' tab
   2.4. Click 'Upload'
        --> Note that the help message above the box to select a file says 'The tool will accept images in GIF, JPEG, PNG, and XPM formats.'
   2.5. Click 'Drop files here or click to select a file'
   2.6. Choose the .xpm image
        --> Note that at this point, the image preview is a broken image
   2.7. Click 'Process images'
        --> Error message: 'Cannot process file as an image. Please ensure you only upload GIF, JPEG, PNG, or XPM images.'

I opened the teapot.xpm image in GIMP and it opens fine. It's not corrupted as far as I know.

I think we should either fix the XPM import or remove the mention that the tool accepts XPM format.