• Resolved johannes25

    (@johannes25)


    Namaste Sayontan Sinha,

    thank you for the nice Plugin. It’s almost perfect but I have one big problem.

    I use Photonic to put my Instagram pictures on my website. Usually Instagram thumbnails are shon with apsect ratio 1:1. But some of my pics are orginally with other aspect ratios like 4:3 or 3:4. In Instagram the thumbnails are automatically zoomed in (cropped) to 1:1. But your plugin make my thumbnails squeezed from 3:4/4:3 to 1:1 aspect ratio. It doesn’t crop/zoom to 1:1, it squeezed to 1:1 what makes faces in the thumbnail look too big or slim.

    How can I let your plugin crop my thumbails to 1:1 like Instagram do?

    Thank you for help in advance.

    Best wishes,
    Daniel

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    The only case where Photonic would do this is if you are trying to forcefully show square thumbnails in your layout. Note that Instagram by itself does not return cropped images via its API for images that are not square, and Photonic will not try to crop images using JS / CSS as this sort of a technique is unreliable for cropping.

    Photonic has different types of layouts, e.g. Justified Grid, Masonry and Mosaic. You might want to explore those – they are much better with layouts that are not dependent on square images.

    Thread Starter johannes25

    (@johannes25)

    Thank you for respond.

    I selected the “Square Thumbnail Grid, Lightbox” – Layout with 320px thumbnail size already. But the square thumbnails are still not cropped in, only squashed to 1:1. Doesn’t look nice.

    Same problem with the layout “Masonry Layout, Lightbox”, no difference to “Square Thumbnail Grid, Lightbox”. This layout squases my images in a same way to 1:1

    And selecting “Mosaic Layout, Light” is a chaotic desaster, everything destroyed.

    No of these 3 layouts show square thumbnails where every images cropped to square (1:1).

    “Justified Grid” ist not listed in your plugin.

    You can have a look in my gallery where I select “Mosaic Layout, Light”: https://www.ds-film.de/photography/

    I use OceanWP Theme with Elemntor Plugin.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Justified Grid = Random justified gallery. Can you try that, please?

    There seem to be some major conflicts between your theme and the plugin. One thing to try is to see if your theme’s lightbox / gallery features can be selectively disabled. It seems like while Photonic is calculating the heights and widths correctly, something on your theme’s side is coming in later and forcing all content to be squares of 320px × 320px (probably looking for the oceanwp-lightbox class, which seems to be getting associated with all photos). There is no such code anywhere on Photonic.

    Just as an experiment, you might want to try temporarily switching to a Twenty* theme and see if the issue is occurring there.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Hi,
    I see that your images are no longer cropped, so I am marking this thread resolved. If you are still facing issues, please feel free to reopen this.

    Thread Starter johannes25

    (@johannes25)

    Hi Sayonthan,

    yes, thank you. It seems that you fixed something. Because everything’s fine now. I only have the problem than no images are displayed anymore if I select resolutions for the lightbox bigger than 640×640 Pixels. This is a little bit disappointing because I know from other plugins that this can work.

    Plugin Author Sayontan Sinha

    (@sayontan)

    That is interesting – can you activate a larger size so that I can see what is happening?

    Thread Starter johannes25

    (@johannes25)

    Ok, I activated already to 1080x1080p. Also I noticed that “more photos” doesn’t load anymore in 640×640 resolution.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Thanks. When I look at the JavaScript console for your page I see that the images it is trying to find do not exist – all of them show up with “403” errors because the URLs being constructed are supposedly invalid.

    I dug around a little and found that Instagram has, as always, sneakily changed the method to find the URL without documenting how. Basically a standard call retrieves 3 resolutions: thumbnail, low_resolution and standard_resolution. No other resolution is supplied by Instagram. The trick to get a higher resolution used to be to replace the size from the thumbnail with the size, but Instagram apparently shut down this technique a couple of months back.

    While I have found a workaround, unfortunately the workaround will take me a few days to implement (and Instagram, which really has the worst API, is likely to change the method again, though I am willing to take the risk).

    I would suggest that if you have an alternative with a different plugin, please go for it. I will post back an update on this thread once I have released the modified code.

    Plugin Author Sayontan Sinha

    (@sayontan)

    OK – another update: I have developed the code for the workaround. It took a surprisingly short amount of time. Is it OK if I test it out some more and release it around the weekend? I want to make sure I am covering all potential scenarios before I release it.

    Thread Starter johannes25

    (@johannes25)

    Ok, thank you for help. I guess I will keep going use your plugin because it’s still the best.

    Plugin Author Sayontan Sinha

    (@sayontan)

    One more thing – now that you have reactivated the 640px size, I am able to click on “More” to see more photos. Can you confirm what you are seeing at your end?

    Thread Starter johannes25

    (@johannes25)

    Yes up to you, you can test it.

    Plugin Author Sayontan Sinha

    (@sayontan)

    Sorry – I should have been clearer. You had said a few comments above:

    Also I noticed that “more photos” doesn’t load anymore in 640×640 resolution.

    But when I look at your site, I am able to click on “More” and new photos are showing up. Are you facing a problem with this?

    Plugin Author Sayontan Sinha

    (@sayontan)

    Hi,
    The higher resolution sizes for Instagram should be working for you now, with version 2.01. Please let me know if you continue facing issues.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘How can I crop (zoom in) thumbnails to 1:1 aspect ratio?’ is closed to new replies.