Skip to content

Include thumbnails instead of the HTML content for /notes/ #5

@gwennlbh

Description

@gwennlbh

Is your feature request related to a problem? Please describe.
The current "thumbnails" for the notes cards is pretty messy (line-height, font-size and other aspects are messed up). Furthermore, when the page contains a lot of notes, loading and rendering the HTML content can lead to performance problems (although this should be fixed by #4)

Describe the solution you'd like
Using wkhtmltopng or another utility, render the HTML server-side to a png file, and include, in place of the content property, a thumbnail property containing a URL to the thumbnail file:

[
  {
    "name": "Lorem ispum"
    // ( other properties... )
    "thumbnail": "https://api.schoolsyst.com/notes/123fed-76488-abcd23-cce268/thumbnail"
 },
 // ( ... )
]

A new GET-only endpoint, /notes/:uuid/thumbnail, should be created and return with a MIME type of image/png the thumbnail of the corresponding note.

For the detail endpoint (/notes/:uuid), keep the content property.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions