• Resolved REPLcook

    (@replcook)


    Hey!

    Been having errors when we try to upload images to our website. If we try PNGs and GIFs (Not that they get compressed), they are uploaded fine. However JPGs return this error:

    Warning: Invalid argument supplied for foreach() in /path/wp-content/plugins/tiny-compress-images/src/class-tiny-plugin.php on line 98
    2131

    One way to fix would be to not upload JPGs, but we can’t control that with multiple users.

    Did we miss a step?

    https://ww.wp.xz.cn/plugins/tiny-compress-images/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author TinyPNG

    (@tinypng)

    Hi REPLcook,

    Thanks for reporting this issue.

    We were not able to reproduce your problem but our best bet is that something else in your WordPress setup is influencing the possible sizes of your images. We have made a change to the source (http://git.io/veAr2) that should prevent the warnings from showing up.

    This change will be in the next version of the plugin, which we expect to roll out within a week.

    If in the meantime you wish to prevent these warnings from showing up, you can manually apply the change to class-tiny-plugin.php in the plugin editor within your WordPress admin.

    For our knowledge, could you provide us with a list of plugins that might interfere with our plugin?

    Thread Starter REPLcook

    (@replcook)

    Hey!

    Thanks for getting back so quickly. I can tell you what plugins we’re using and also the theme.

    Theme – Avada

    Plugins:

    WordPress SEO
    Fusion Core
    Contact form 7
    Revolution Slider
    Akismet

    I can’t see any of those directly interfering.

    Thanks for the help so far. Could it be a server setup issue?

    Plugin Author TinyPNG

    (@tinypng)

    Hi,

    Thanks for the information, we’ll go take a look to see what could be cause of your problem. We don’t see how it could be directly related to server setup, especially if PNG works.

    We’ve just released the new version (1.2.0) already! Could you give it a go and verify that you don’t see the warnings anymore?

    Thread Starter REPLcook

    (@replcook)

    Just updated and it works!!!!

    Thanks guys!

    Plugin Author TinyPNG

    (@tinypng)

    Good to hear!

    If you’ve got any more questions just let us know 🙂

    Thread Starter REPLcook

    (@replcook)

    Ok, it works with most of our JPG images, some of them are still having issues, so I’m seeing if it is something our side first 🙂

    Thread Starter REPLcook

    (@replcook)

    Hey!

    We have solved the issue. Some PNGs were messing up too. Turns out that some had been “Saved for web” in Photoshop, and those were the ones causing the error.

    We tested it by grabbing random images off the net (Just in case it was ust ours) and testing them with and without Photoshop compression.

    Plugin Author TinyPNG

    (@tinypng)

    Thanks for letting us know, happy compressing!

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

The topic ‘JPG Compression Error’ is closed to new replies.