Large Image

This topic contains 17 replies, has 3 voices, and was last updated by  Stiofan O’Connor 6 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #397163

    Moez Tharani
    Full Member
    Post count: 60

    I suspect this is a bug. We need to have large images associated with our listings for use with AppPresser, so we went ahead and uploaded new featured images that are 1024×1024 for all of our featured listings. But this wasn’t generating “large” image urls via the API and there weren’t any large image variants of the files in the upload folder. So I started doing some testing and found that any square image uploaded over 1024 in height or width is resized to 1024 width for the default image and no large image is generated. Change that image to 1026×1024 and it is resized to 1024×1022 with a large variant available at that same size. The same does not happen if I use a square (1024×1024) image for a post. In that instance, a large variant is created. Just to provide more clarity:

    Upload featured_image.png at a resolution of 1024×1024, 1100×1100, 2000×2000, etc. and get:
    ###_featured_image-150×150.png (thumbnail)
    ###_featured_image-300×300.png (medium)
    ###_featured_image-768×768.png (medium-large)
    ###_featured_image.png (standard, 1024×1024)

    Upload featured_image.png at a resolution of 1026×1024 and get:
    ###_featured_image-150×150.png (thumbnail)
    ###_featured_image-300×300.png (medium)
    ###_featured_image-768×767.png (medium-large)
    ###_featured_image-1024×1022.png (large)
    ###_featured_image.png (standard, 1024×1022)

    #397178

    Guust
    Moderator
    Post count: 29970

    Have a look at your media settings at WP Settings > Media.

    Thanks

    #397181

    Moez Tharani
    Full Member
    Post count: 60

    Sorry, was that supposed to be helpful in some way? My Media settings show that Thumbnail is 150×150, Medium is 300×300 and Large is 1024×1024.

    Again, when I upload a featured image for a post that is 1024×1024 or larger (a square), it generates a large variant that is 1024×1024. However, when I do the same for a GD post, it will not generate a large variant if the image is a square. If the image is not a square and exceeds 1024 in height or width, it will generate a large variant. Let me know if I’m not making the issue clear and I’ll do my best to clarify.

    #397183

    Guust
    Moderator
    Post count: 29970

    Seems I misunderstood the question, I thought you wanted images bigger than 1024.

    If you upload a 2000×2000 image to a GD listing, does it not resize it to 1024×1024?
    And if you upload a 1024×1024 image, why would you expect a duplicate?

    https://wpgeodirectory.com/docs/core-design/#listing-image-size
    https://wpgeodirectory.com/docs/core-design/#resize-image

    Sorry if I am misunderstanding again.

    #397184

    Moez Tharani
    Full Member
    Post count: 60

    If I upload an image to GD listing that is 2000×2000, it resizes the image to 1024×1024 and sets that as the default image. It also generates 150×150 thumbnail, 300×300 medium, and 768×768 medium-large. But it doesn’t generate a large image of 1024×1024. If I upload an image that is 2000×2001, however, it will resize it something close to 1024×1024 and also generate a large image that is close to 1024×1024. It seems like a perfect square image will not generate a large image, under any circumstances. This doesn’t happen if I upload a featured image to a regular post. In that case, I get thumbnail, medium, medium-large and large.

    The reason this is a problem is that AppPresser requires a large image URL for displaying in certain ways.

    #397223

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    Please tick the option GD>Design>Home>Resize image large size
    And then give it a try.

    Thanks,

    Stiofan

    #397335

    Moez Tharani
    Full Member
    Post count: 60

    I’ve already done that, no change.

    #397366

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    It does not create the “large” size because it makes the full image the large size, this is done to save disk space.

    Stiofan

    #397418

    Moez Tharani
    Full Member
    Post count: 60

    But that’s not true. It does create the large image if the image exceeds 1024 in height or width and is not a square. If the image is a square, it does as you suggest. Which makes no sense.

    #397428

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Moez,

    What we are doing it an extra step to save disk space and help the site load faster.

    If you upload a 2000×2000 image to WP it upload the original size and then create all sizes smaller. What we do is make the image first as big as the max large size and then process it.

    If you upload a 1024×1024 it will not generate the large size as it would just be duplicating the image and there is no need. I have attached a sample image for you to test.

    Stiofan

    #397444

    Moez Tharani
    Full Member
    Post count: 60

    Stiofan, you’re killing me man. Hopefully, fourth time is the charm.

    You’re right, if I upload a 1024×1024 image to a GD post, it will use that as the default image size and not generate a large image. While acceptable, WordPress itself doesn’t behave this way. It will create a duplicate large image if you do the same thing with a post. But that’s fine, no big deal. My issue is that if I upload a 2000×2000 image to a GD post, GD will create a default image sized 1024×1024 (it does NOT keep the original size) and does not generate a large variant. If I upload an image that isn’t square, say 1026×1024, GD will resize it to 1024×1022, set that as the original, and generate a large variant. I don’t understand why it would not do this consistently for any image exceeding 1024 in width or height.

    #397474

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This is standard WP behavior, upload that test image as a feature image on a blog post and it will not create a large image…

    Do you need an image larger then 1024?

    Stiofan

    #397480

    Moez Tharani
    Full Member
    Post count: 60

    Let’s talk about standard WordPress behaviour. I’ve attached a 2000×2000 image. When I upload this image as a featured image for a WordPress post, I end up with a thumbnail image, 150×150, a medium image, 300×300 and a large image, 1024×1024, in addition to the original image at 2000×2000 which is also in the uploads folder. Perfect.

    Now, if I do the same thing with GD and upload this exact same image with a GD post, what happens? I end up with a thumbnail image, 150×150 and a medium image, 300×300. The original image is resized to 1024×1024 and I have no large image. This presents a problem with the API because it means there is no large size variant of the featured image.

    It’s not standard WordPress behaviour. So why is this happening? And again, why is it only happening with perfectly square images?

    #397492

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I explained here already https://wpgeodirectory.com/support/topic/large-image/#post-397428 🙂

    1. If you upload a 1024×1024 as a featured image to a blog/page it will NOT create a large image becasue the full size image is the EXACT size of the large image.
    2. When GD images are uploaded we shrink the image to the large size before processing to save space, we do not crop the image we just shrink the max width, from this point forward the standard WP upload rules apply.

    I can feel you are getting frustrated, i’m just trying to explain why it happens, if you explain what you need we might get somewhere quicker, do you need the images to be over 1024px? 🙂

    Stiofan

    #397499

    Moez Tharani
    Full Member
    Post count: 60

    Oh I see. So you resize my 2000×2000 image to 1024×1024 and then tell WordPress to do its thing. WordPress sees the 1024×1024 image and doesn’t generate a large image. Sorry Stiofan, I didn’t fully understand your explanation before.

    Is there a way to disable that? The reason this presents a problem is that AppPresser is looking for the large image variant for it’s featured listing slider that uses the WordPress API for content. This is so the image doesn’t appear pixelated on higher resolution devices, like retina iPad’s. When we provide instructions for listing submissions, I can tell people “make sure your featured image is at least 1025 in height or width to be compatible with the app”. That’s easy. But because of what you guys are doing, I have to tell them “make sure your featured image is at least 1025 in height or width but is not a square to be compatible with the app”. That will be much harder to explain.

Viewing 15 posts - 1 through 15 (of 18 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket