• Hi there,

    for quite some time now, I experience a weird issue where Imagify settings are being reset. Especially noticeable for the option Display images in Next-Gen format on the site, since that’s where I usually notice it.

    I added a logging mechanism to the action update_site_option_imagify_settings so that I can check when and where the settings are being updated (as it doesn’t happen manually).

    This log stores the following data:

    [
    'new_value' => $new_value,
    'site' => \home_url(),
    'trace' => \debug_backtrace( \DEBUG_BACKTRACE_IGNORE_ARGS ),
    'user_id' => \get_current_user_id(),
    ],

    The result was this:

    Array
    (
    [new_value] => Array
    (
    [version] => 2.2.6
    [api_key] => *snip*
    [optimization_level] => 2
    [lossless] => 1
    [auto_optimize] => 1
    [backup] => 1
    [resize_larger] => 0
    [resize_larger_w] => 2560
    [display_nextgen] => 0
    [display_nextgen_method] => picture
    [display_webp] => 0
    [display_webp_method] => picture
    [cdn_url] =>
    [disallowed-sizes] => Array
    (
    )

    [admin_bar_menu] => 1
    [partner_links] => 0
    [convert_to_avif] => 0
    [convert_to_webp] => 0
    [optimization_format] => webp
    )

    [site] => https://subsite.example.com
    [trace] => Array
    (
    [0] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/class-wp-hook.php
    [line] => 326
    [function] => log_settings_update
    [class] => *snip*
    [type] => ::
    )

    [1] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/class-wp-hook.php
    [line] => 348
    [function] => apply_filters
    [class] => WP_Hook
    [type] => ->
    )

    [2] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/plugin.php
    [line] => 517
    [function] => do_action
    [class] => WP_Hook
    [type] => ->
    )

    [3] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/option.php
    [line] => 2463
    [function] => do_action
    )

    [4] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/option.php
    [line] => 1984
    [function] => update_network_option
    )

    [5] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-content/plugins/imagify/inc/classes/class-imagify-abstract-options.php
    [line] => 367
    [function] => update_site_option
    )

    [6] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-content/plugins/imagify/inc/classes/class-imagify-abstract-options.php
    [line] => 233
    [function] => set_raw
    [class] => Imagify_Abstract_Options
    [type] => ->
    )

    [7] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-content/plugins/imagify/inc/admin/upgrader.php
    [line] => 316
    [function] => set
    [class] => Imagify_Abstract_Options
    [type] => ->
    )

    [8] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/class-wp-hook.php
    [line] => 324
    [function] => _imagify_new_upgrade
    )

    [9] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/class-wp-hook.php
    [line] => 348
    [function] => apply_filters
    [class] => WP_Hook
    [type] => ->
    )

    [10] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/plugin.php
    [line] => 517
    [function] => do_action
    [class] => WP_Hook
    [type] => ->
    )

    [11] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-content/plugins/imagify/inc/admin/upgrader.php
    [line] => 69
    [function] => do_action
    )

    [12] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/class-wp-hook.php
    [line] => 324
    [function] => _imagify_upgrader
    )

    [13] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/class-wp-hook.php
    [line] => 348
    [function] => apply_filters
    [class] => WP_Hook
    [type] => ->
    )

    [14] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-includes/plugin.php
    [line] => 517
    [function] => do_action
    [class] => WP_Hook
    [type] => ->
    )

    [15] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-admin/admin.php
    [line] => 176
    [function] => do_action
    )

    [16] => Array
    (
    [file] => /srv/apache2/example.com/htdocs/wp-admin/index.php
    [line] => 10
    [args] => Array
    (
    [0] => /srv/apache2/example.com/htdocs/wp-admin/admin.php
    )

    [function] => require_once
    )

    )

    [user_id] => 58
    )

    So to me, it looks like there is an issue if a site has no version information about Imagify (probably when I first visit the admin area of a site that has been around already before installing the plugin). It then triggers the imagify_upgrade action and updates the network options, even though there is just a single site where the version information is missing. To me, this sounds wrong, since a single site should not automatically (re)set any network-wide setting that has been made before.

    Please look into this, as it’s quite annoying for me whenever this happens. 😬

    Best regards,
    Matthias

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support WPM Support

    (@saranshwpm)

    Hi @kittmedia,

    Thank you for your message.

    From the trace and details you shared, it looks like Imagify is currently activated at the network level. In this mode, settings are stored and managed network-wide, so when one subsite triggers the upgrader or reinitializes version data, it can reset certain options across all sites.

    Please try activating Imagify individually on each site instead of at the network level and see if the issue persists.

    When activated per site, each site will maintain its own Imagify settings independently, including the “Display images in Next-Gen format” option. This setup also allows you to:

    • Choose different optimization levels (Smart, Aggressive, or Lossless) per site
    • Customize which thumbnail sizes are optimized

    This should prevent settings from being reset network-wide and keep your Next-Gen preference stable.

    Best regards,

    Thread Starter Matthias Kittsteiner

    (@kittmedia)

    Hi there,

    I explicitly want to enable it network-wide since I don’t want to set the settings individually. Thus, it should be fixed on your side instead of providing a workaround, since network-wide activations explicitly should work network-wide. And since you explicitly provide support network-wide, you should fix the issue.

    Best regards,
    Matthias

    Plugin Support WPM Support

    (@saranshwpm)

    Hi Matthias,

    I understand your point, and just to clarify that this isn’t really a workaround but an advised configuration to avoid such behavior in multisite environments. When Imagify is network-activated, all settings are stored and managed at the network level, which can lead to unexpected resets when a subsite triggers the upgrader or version check. Activating it per site helps isolate settings and prevent these resets.

    That said, I’ll pass this along to our product team so they can review the current handling of network-wide upgrades and consider improving it in a future release.

    Best regards,

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.