rosell-dk / webp-convert

Convert jpeg/png to webp with PHP (if at all possible)
MIT License
578 stars 102 forks source link

Make available converter options accessible #279

Closed rosell-dk closed 2 years ago

rosell-dk commented 3 years ago

Lets make the available converter options accessible. This will make it possible to create GUI that automatically displays the conversion options. Maybe expose as JSON Schema?

Example:

{
  id: 'size-in-percentage',
  schema: {
    type: ['integer', 'null'],
    default: null,
    title: 'Size in percentage',
    description: 'Target size to aim for in percentage of original'
    minimum: 0,
    maximum: 100
  },
  ui: {
    component: 'input',
   "links": [
                    [
                        "Guide",
                        "https:\/\/github.com\/rosell-dk\/webp-convert\/blob\/master\/docs\/v2.0\/converting\/introduction-for-converting.md#preventing-unnecessarily-high-quality-setting-for-low-quality-jpegs"
                    ]
                ],
  }

Valid types, see here Numeric: https://json-schema.org/understanding-json-schema/reference/numeric.html

rosell-dk commented 3 years ago

Reopened. We are not nearly done yet.

rosell-dk commented 2 years ago

Ready!