ajnsmits Posted May 30 Report Share Posted May 30 Good afternoon, everyone, I have photos and documents with the .webp extension. They’re nice and small in terms of file size. They load really fast and are still easy to read, which is important for birth certificates and such. But I’ve just noticed that when I hover my mouse over the thumbnail, the photo viewer won’t display them. The Family Preview mod does show the .webp photos of the people, though. Is that other viewer also a mod? According to the wiki, I can add .webp files starting with version 15. The other file extensions are displayed. If I want to search on Wiki, what is this viewer called? André Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted May 31 Report Share Posted May 31 André, I just tested it and I have no problem showing the webp file. No family preview mod installed Rob Quote Link to comment Share on other sites More sharing options...
ajnsmits Posted May 31 Author Report Share Posted May 31 Okay, thanks for the reply. Now I know it’s possible. I see you’re running TNG 15.0.4, and I recently installed TNG 15.0.5. Maybe I should check there. André Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted May 31 Report Share Posted May 31 Just updated my signature Quote Link to comment Share on other sites More sharing options...
ajnsmits Posted May 31 Author Report Share Posted May 31 Rob, would you be so kind as to check whether the file ajx_smallimage.php contains the same lines as mine? $photoinfo = @GetImageSize( $imagename ); switch($photoinfo[2]) { case 1: //GIF $image = @imageCreateFromGif( $imagename ); break; case 3: //PNG $image = @imageCreateFromPng( $imagename ); break; default: //JPEG $image = @imageCreateFromJpeg( $imagename ); break; } if(is_array($crop)) { $image = @imagecrop($image, ['x' => intval($crop[0]), 'y' => intval($crop[1]), 'width' => intval($crop[2]), 'height' => intval($crop[3])]); if($image !== FALSE) { $photoinfo[0] = $crop[2]; $photoinfo[1] = $crop[3]; } } I've modified this file, and now it works for .webp files. But since it's a system file, I'd still like to know if I've missed an update somewhere. Quote Link to comment Share on other sites More sharing options...
Rob Severijns Posted May 31 Report Share Posted May 31 This is what I have. $photoinfo = @GetImageSize( $imagename ); switch($photoinfo[2]) { case 1: //GIF $image = @imageCreateFromGif( $imagename ); break; case 3: //PNG $image = @imageCreateFromPng( $imagename ); break; default: //JPEG $image = @imageCreateFromJpeg( $imagename ); break; } if(is_array($crop)) { $image = @imagecrop($image, ['x' => intval($crop[0]), 'y' => intval($crop[1]), 'width' => intval($crop[2]), 'height' => intval($crop[3])]); if($image !== FALSE) { $photoinfo[0] = $crop[2]; $photoinfo[1] = $crop[3]; } } It looks the same Quote Link to comment Share on other sites More sharing options...
ajnsmits Posted May 31 Author Report Share Posted May 31 That's strange, I edited the file, and now the viewer shows the .webp files too. I'm glad I figured it out, and I'll make a private mod out of it so I can update it when the next update comes out. Thanks, Rob, for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.