strata / frontend

The front of Headless CMS. Build an efficient front-end website taking content from multiple data sources.
MIT License
13 stars 5 forks source link

Add thumbnail to document content type #59

Open simonrjones opened 4 years ago

simonrjones commented 4 years ago

Sean: I’m using the document type for a file upload, but it’s not passing through the following data from WordPress:

simonrjones commented 4 years ago

Exists in WP API:

Example mime types:

See AssetField::guesser() and getMimeType()

Also see:

simonrjones commented 4 years ago

File type added via asset.getExtension on v0.6.5

Need to review options for creating image thumbnail, since not trivial to resolve this on the WordPress end. May be best to solve on Frontend.

simonrjones commented 4 years ago

See https://packagist.org/packages/spatie/pdf-to-image https://freek.dev/223-convert-a-pdf-to-an-image-using-php