Thumbnails for odt files

Hello,
I have saved my personal thumbnail for odt files :
‘user/themes/quark/images/media/thumb-odt.png’
but the thumbnail which is displayed is the default one (with O,D,T in orange background).
I don’t understand why ?
Thank you !

@pzul, First of all… don’t make any changes in a downloaded theme!

Instead, create an inherited theme. If changing Quark itself, you will loose all changes when Quark gets upgraded.

We need a tad more information:

  • How do you display the thumbnail?
  • Where do you display the thumbnail?
  • What does the HTML look like?

My customisations are in the user folder.
I use this code in a md file :

lien vers odt

[lien vers odt](grille.odt?link&resize=50,50)

@pzul, the following steps will replace the default thumb by your own custom thumb:

  • Extension ‘odt’ is not supported by default, so we need to tell Grav about it:
    • copy ‘/system/config/media.yaml’ into folder ‘/user/config’
    • add the following snippet somewhere in the file. eg. right above ‘doc’
      odt:
        type: file
        thumb: media/thumb-odt.png
        mime: application/vnd.oasis.opendocument.text
      
  • Add your custom thumb PNG in '/user/images/media/thumb-odt.png
  • Add the following to your page (*.md)
    ![My doc](doc.odt?link&resize=100,100)
    
  • Resulting HTML:
    <a href="/user/pages/01.home/doc.odt">
      <img alt="My doc" src="/images/path/to/cached-thumb-odt.png">
    </a>
    

Thank you !
My png wasn’t in the correct folder…