• Hi!

    With square-thumbnails plugin enabled, I use the multi-file uploader to upload a .jpg.( https://cloudup.com/id9011u8cLL ).

    I get a “HTTP error.” (screenshot below.)

    Screenshot of the “HTTP error.” message inside the Upload New Media > multi-file uploader screen, after having tried to upload a file.
    2017 08 04 square thumbnails

    I look in the sub-folder of the uploads folder, and do see that the .jpgs became uploaded. However they didn’t become re-sized. (they are as if the native wordpress upload took place. no special re-size happened, no special square thumbnail made)

    Also, for the uploads that happened at this time, they are missing icons when viewed in the Media Library.

    Screenshot of icons missing:
    2017 08 04 0810 square thumbnails

    Then, I disabled the plugin. Then uploads happened as expected. Re-enabled the plugin. “HTTP error.” persists.

    What’s a good next step, towards defining what’s happening here? (On the way to making a fix for it)

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author ilmdesigns


    Hi Jassen,

    Thank you for your interest in our plugin and for posting this issue, so well explained. I will try to find the problem ASAP and I will let you know when it is fixed. Maybe tomorrow.


    Thread Starter mjassen (mjjojo)



    Thank you for replying. I’m also still trying to progress this on my end 🙂

    I turned on debugging in WP and saw this error:

    [08-Aug-2017 12:27:36 UTC] PHP Fatal error: Uncaught Error: Call to undefined function eregi() in /Applications/MAMP/htdocs/mzz-woo-wp/wp-content/plugins/square-thumbnails/admin/class-square-thumbnails-admin.php:163

    , and so then I updated lin 163 of class-square-thumbnails-admin.php
    ( https://plugins.trac.wordpress.org/browser/square-thumbnails/trunk/admin/class-square-thumbnails-admin.php?rev=1701279#L163 ),

    to be preg_match(... (instead of eregi(... )

    So that made a big difference. Now most (4 or 5) of the thumbnails are being generated as squares, with white backgrounds, as expected! Which is awesome.

    Now I’m still working on my underlying issue, which is how to set the thumbnails on the WooCommerce Shop page, to be one of these nice square thumbnails.

    For example, now, I upload the product image, but WooCommerce isn’t choosing one of the 4 or 5 nice square thumbnails as the thumbnail for the products on the shop page, instead WooCommerce is choosing the original copy of the image as the thumbnail on the shop page.

    In my install, for example, it chooses the http://localhost:7888/mzz-woo-wp/wp-content/uploads/2017/08/portrait-copy-1.jpg, which is my case is not one of the square-thumbnails but is a rectangle image.

    Whereas my end goal is to have on the shop page, all square thumbnails of the same width and height (without having been cropped)!

    I tried tweaking the WooCommerce product display settings, but haven’t yet gotten a setting that works.

    Have you also faced this problem, and perhaps already have a known workaround?

    Is this the same use case that the plugin is designed to cover? I mean creating all square thumbnails on the shop page.?

    Plugin Author ilmdesigns


    Thank you very much for solving this and for providing all the details.
    I played a little with woocommerce and I find that “Hard crop” should be unchecked.

    Here is the screenshot

    And the result (I selected that red for bg)

    Plugin Author ilmdesigns


    I committed an update to fix eregi issue

    Thread Starter mjassen (mjjojo)



    Thank you very much for replying, and for including that most recent screenshot. (The second one, that shows you are using Twenty Fifteen theme)

    Before I saw the screenshot I didn’t think the solution was solved. But now I think it is.

    My goal is for the “Store” page (that shows all the products) to show the square, non-cropped thumbnails.

    With your plugin, plus the Twenty Fifteen theme, this is now a viable solution for me!

    (In Twenty Seventeen, since it pulls the larger images for display on the “Store” page, it wasn’t what I wanted. (for example for me, in Twenty Seventeen, it pulls landscape-copy-1024×576.jpg, or portrait-copy.jpg) )

    But in Twenty Fifteen, since it pulls the thumbnails for display on the “Store” page, it’s what I wanted! (for example for me, in Twenty Fifteen, it pulls landscape-copy-300×169.jpg, or portrait-copy-169×300.jpg)

    Screenshot of it working well in the Twenty Fifteen theme for me:
    2017 08 08 1203 twenty fifteen

    Will you be able to put in the preg_match(..., or similar fix/update, into the plugin’s core code, to fix the earlier error?

    • This reply was modified 6 years, 9 months ago by mjassen (mjjojo). Reason: minor grammar and punctuation fix
    Plugin Author ilmdesigns


    Yes, I put in the update, so it is fixed. Thanks!

    Thread Starter mjassen (mjjojo)



    Haha I was writing at the same time as you — I just saw this.

    Thank you.

    Also, I’ve just updated to Version 1.0.2 of the plugin, and then did another test. Yes, the 1.0.2 fix works for me — it now uploads without error!

    Thank you again, I’ve marked the thread as resolved.

    Plugin Author ilmdesigns


    Cool! I am glad that is working well for you now! Thanks a lot for reporting the issue and for all your help!

    Hi there – you would be the awesomeness in person (if it would work) can you tell me what the reason could be that regenerate thumbnails will not have an effect on my already uploaded images? like i created a png with the size of 350×200 and its no regenerating it to a square?

    Thanks for this awesome plugin

    i just checked what it does when i upload a rectangular image – so for the media library it created a square thumbnail but not for the woocommerce frontend. Just fyi

    i tell you i would pay you money if this works properly

    Plugin Author ilmdesigns


    Hi chuchilade,

    I will check tomorrow and I will make an update for the plugin. Thank you for using the plugin and for reporting the bug! The plugin is free, so you don’t have to pay for fixes!
    Thank you!

    Hi thats nice, i will donate something if it works as expected!

    i now tried to upload a picture via the media library and the following error messages showed up:

    Warning: preg_match(): Unknown modifier ‘?’ in /home/chuchila/public_html/build/wp-content/plugins/square-thumbnails/admin/class-square-thumbnails-admin.php on line 163

    Warning: preg_match(): Unknown modifier ‘?’ in /home/chuchila/public_html/build/wp-content/plugins/square-thumbnails/admin/class-square-thumbnails-admin.php on line 163

    Warning: preg_match(): Unknown modifier ‘?’ in /home/chuchila/public_html/build/wp-content/plugins/square-thumbnails/admin/class-square-thumbnails-admin.php on line 163

    this does not happen by uploading directly in a woo post (product). maybe it happens but it’s not shown.

    if you like i can give you more information about issues happening to me.

    As additional info – i’m using the storefront theme. Something strange is, that when i open the shop in a new incognito tab the archive page thumbnail appears correct (square), after visiting product single page and getting back it appears rectangular. you can check this behaviour by visiting https://www.build.chuchilade.ch/produkt-kategorie/kochen-backen/?orderby=price (product Tee Ei lose) with the 900×600 pic.

    Hi, this is the plug-in I have been looking for a long time! However, I am having the exact same issues as chuchilade. Any updates on this? Would be awesome. Thanks

    Plugin Author ilmdesigns


    Sorry for taking so long, but I was very busy these days. I updated the plugin with the fixes and now is working. Please update and let me know if everything is working well.

    Thank you for reporting the bug and for using the plugin.

    Narcis Bodea

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘square-thumbnails Plugin Upon Uploading File We See HTTP error.’ is closed to new replies.