Sign in

Share picture from Gallery not working

  • This topic has 6 replies, 2 voices, and was last updated 7 months, 1 week ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5732
    Carsten

    Hello,

    I hope you can help as I have rebuild my photo portfolio website with Publii and now face a critical issue. I am using the gallery a lot. Unfortunately sharing specific pictures from a gallery does not work at all and I was able to reproduce it on the theme demo pages for Mercury and Photography themes.

    If you open a picture the URL changes, which is promising. However if you share this URL, it seems like these parameters are not processed or passed to the gallery component and the picture is not opened. This also renders the ‘share’ buttons on the gallery useless. If you use for example the Facebook share button it shares exactly the same URL as in the address bar and does not open the image, but just the page that has the gallery embedded.

    As the URL is changing for each opened image my hope is that this can be fixed and the shared image will be automatically opened if such an URL is called.

    For example with this URL: https://demo.getpublii.com/themes/mercury/3/gallery/#&gid=1&pid=2 I would like to share the headphones image from the Mercury demo page. But instead of opening this image, it just opens the Gallery page.

    Another thing that is missing, but I am not sure whether this is possible with a static site generator: If I share such a image in a gallery on Facebook that image should also be used as preview image for the URL. With that it would be perfect. But as a minimum requirement I would need the link open the shared image.

    Really hope this gets fixed as otherwise I absolutely love Publii and would like to get the Photography theme, but right now this is a showstopper for me 🙁

    Thank you very much.

    #5733
    Bob

    Publii uses Photoswipe’s gallery engine to generate galleries; also the share feature, originally provided by the Photoswhipe script, works exactly the same, check it out here: https://photoswipe.com/

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5734
    Bob

    My fault, I didn’t notice the problem before, now I see. I will try to fix it asap.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5735
    Carsten

    Thank you very much!!!

    Another (less important issue)

    If you open this URL: https://demo.getpublii.com/themes/mercury/3/gallery/#&gid=1&pid=2 (headphones image) you get the page without the image opened as said before. If you click on the sailboat however, Photoswipe opens the headphones. But that is really a minor issue in comparison and I guess it will be solved, when the photo is opened after launching the URL.

    #5736
    Bob

    Yeap I know, this is exactly the same problem and reason why the “social URLs” do not open the selected picture.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5745
    Bob

    For a quick fix open the photoswipe.hbs ‎⁨file (Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME ▸ partials) and change the following piece of code:

    initPhotoSwipeFromDOM('.gallery');

    to

    window.addEventListener('load', function () {
    initPhotoSwipeFromDOM('.gallery');        
    }, false);

    It should help.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #5750
    Carsten

    Works like a charm. Thanks so much for the quick help. Awesome!

    Donation on the way…

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.