{"id":17326824,"url":"https://github.com/rejetto/thumbnails","last_synced_at":"2026-03-16T22:01:57.605Z","repository":{"id":169181104,"uuid":"645089243","full_name":"rejetto/thumbnails","owner":"rejetto","description":"HFS plugin to show thumbnails for images in place of icons. Works best on \"tiles mode\" (enable it in frontend's options).","archived":false,"fork":false,"pushed_at":"2025-02-23T17:36:39.000Z","size":34169,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-27T04:44:47.329Z","etag":null,"topics":["hfs-plugin"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rejetto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-24T22:44:58.000Z","updated_at":"2025-02-23T17:36:43.000Z","dependencies_parsed_at":"2024-01-06T13:48:59.709Z","dependency_job_id":"e6a55204-9bb4-4d3e-90cb-0b402ab3d65b","html_url":"https://github.com/rejetto/thumbnails","commit_stats":null,"previous_names":["rejetto/thumbnails"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rejetto%2Fthumbnails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rejetto%2Fthumbnails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rejetto%2Fthumbnails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rejetto%2Fthumbnails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rejetto","download_url":"https://codeload.github.com/rejetto/thumbnails/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724490,"owners_count":21151557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hfs-plugin"],"created_at":"2024-10-15T14:17:36.351Z","updated_at":"2026-03-16T22:01:57.528Z","avatar_url":"https://github.com/rejetto.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thumbnails\n\nHFS plugin to show thumbnails for images in place of icons. Works best on \"tiles mode\" (enable it in frontend's options).\n\nPlugin \"sharp\" will be automatically installed because it's necessary for this plugin to work.\n\n\u003cimg width=\"700\" alt=\"image\" src=\"https://github.com/rejetto/thumbnails/assets/1367199/d74a8a24-a6f8-4460-93de-74d9d6bd413f\"\u003e\n\n# Extendable\n\nThis plugin is extendable: other plugins can add support for more formats without having to care of all details,\njust the minimum.\nLet's say you want to create a plugin that adds PDF support to thumbnails. You should do something like:\n```js\nexports.onDirEntry = ({entry}) =\u003e {\n    if (entry.n.endsWith('.pdf'))\n        entry._th = 1\n}\n\nexports.customApi = {\n    thumbnails_get({ ctx, path }) {\n        if (path.endsWith('.pdf')) {\n            const thumbnailImage = ...your code to generate the thumbnail\n            return thumbnailImage\n        }\n    }\n}\n```\n\nThere's an alternative way to the `onDirEntry`, and it's to define a `frontend_js` with this \n```js\nHFS.onEvent('thumbnails_supported', ({ entry }) =\u003e\n    entry.n.endsWith('.pdf') )\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frejetto%2Fthumbnails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frejetto%2Fthumbnails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frejetto%2Fthumbnails/lists"}