wp-media / imagify-plugin

Speed up your website with lighter images without losing quality.
https://imagify.io
73 stars 27 forks source link

Preserve webp setting options with update from versions older than 2.2 #849

Closed wordpressfan closed 8 months ago

wordpressfan commented 8 months ago

Description

Fixes #848 Fixes #850

Documentation

User documentation

Here we added back the webp option names, so those old options (display_webp, display_webp_method, and convert_to_webp) will be kept on the database but without UI.

Then when the user updates to the latest version we will move those options' values to the corresponding new ones.

Technical documentation

Explain how this code works. Diagram & drawings are welcomed.

Type of change

Delete options that are not relevant.

New dependencies

List any new dependencies that are required for this change.

Risks

List possible performance & security issues or risks, and explain how they have been mitigated.

We only have one risk that I can think of now, having not used settings in the database but it worth having them because also what if any user reverted back to an older version of imagify after updating to the latest version, with this change, he will find everything set properly in older versions too.

Checklists

Feature validation

Documentation

Code style

Observability

Risks

Mai-Saad commented 8 months ago

related tests https://docs.google.com/spreadsheets/d/1Johcl8EGXoUVF073rs8ljMQgDU0wQr3A9irPTWRqp4Q/edit?usp=sharing