Jump to content

Cropping large image exceptionally slow (20mins+)


SamC
 Share

Recommended Posts

So this image is a hefty 4000 x 3000 and I tried to crop out an area 2500 x 1500. The little red 'saving' icon appears when I click 'Apply', then just spins, and spins, and spins... for the past 20mins. I get the feeling it's not liking this too much.

My auto generated images work ok on page refresh, a bit slow the first time (I believe the cached one is used after that) but this site is only going to have about 10 full size images total so space is not my concern, I will use larger images for larger resolutions, smaller ones for tablet/mobile with some inline CSS background images using PHP variables holding the different image sizes (and a class that only populates in a div if there is actually an image present, set to 1 image or null) i.e.

// main.php
    <?php
        if ($page->mainImage) {
            $className = 'main-image-wrapper';

            $options = array(
                'cropping' => 'center'
            );
			
            // the original image sizes will be anything up to 4000 x 3000 but at least 768px wide
            $small = $page->mainImage->size(768, 280, $options);
            $large = $page->mainImage->size(1000, 350, $options);

            $smallBgImage = $small->url;
            $largeBgImage = $large->url;

        }
    ?>

    <style type="text/css">
        #main-image-wrapper {
            background-image: url('<?php echo $smallBgImage ?>');
        }

            @media screen and (min-width: 768px) {
                #main-image-wrapper {
                    background-image: url('<?php echo $largeBgImage ?>');
                }
            }
        }
    </style>

Anyway, the API generated images don't take 'too' long, not fast but bearable. However, the slow cropping in the admin area might be an issue. Is there a way to speed this up other than using smaller images?

ImageMagick perhaps? Thanks.

 

--EDIT--

To add, this is on localhost with PW v3 (not sure exact version off hand). Thanks.

Edited by SamC
More specific
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...