The checkbox 'Compress with TinyPNG' is not visible in the image style configuration page when you have an api key configured and the 'Enable TinPNG image action' checkbox is checked.

When you have an api key and the TinyPNG image action is enabled, the checkbox should be visible.

Faulty code in the tinypng.module at line 73, in the function tinypng_form_image_style_edit_form_alter:

  if (
    !empty($config->get('api_key'))
    || empty($config->get('image_action'))
  ) {
    return;
  }

I understand the code above like this: the checkbox is not added if the api_key is not empty or if the TinyPNG image action is not enabled.

The correct condition should be: the api key is empty or the TinyPNG image action is not enabled.

CommentFileSizeAuthor
#2 3137904-2.patch492 bytesfaeby

Comments

faeby created an issue. See original summary.

faeby’s picture

StatusFileSize
new492 bytes

Here is the patch that fixed my problem.

faeby’s picture

Status: Active » Needs review

  • tikaszvince committed be18c7f on 8.x-1.x authored by faeby
    Issue #3137904 by faeby: Checkbox 'compress with TinyPNG' is always...
tikaszvince’s picture

Status: Needs review » Fixed

Hi @faeby,

Thank you the contribution. It will be part of the next release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.