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 !
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Content & Markdown
Solved by pamtbaau View solution
@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](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'
YAML
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)
TXT
 - Resulting HTML:
HTML
<a href="/user/pages/01.home/doc.odt"> <img alt="My doc" src="/images/path/to/cached-thumb-odt.png"> </a>
last edited 03/12/21 by pamtbaau
Thank you !
My png wasn't in the correct folder...
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 6 | 99 | 8 months ago | ||
| 10 | 186 | 1 year ago | ||
| 4 | 148 | 1 year ago | ||
| 3 | 62 | 1 year ago | ||
| 4 | 257 | 1 year ago |