Thanks for the great extension! This is really helpful for photography and graphics threads to view images full screen.

I noticed you managed to suppress/ignore fof/reactions and Flamoji images from fancybox. Any chance you could suppress Country Flags images too please?
All of our threads are currently looking like this 😅

    1.1.3

    What's Changed

    Full Changelog: 1.1.2...1.1.3

    • Prevent Country Flags from being captured by fancybox (adbo This should be fixed, I haven't tested it so I appreciate if you can confirm 🙂)

    ♻ Update

    composer require darkle/fancybox
    php flarum cache:clear

      Darkle Thank you for the speedy work. Updating to 1.1.3 and clearing cache doesn't seem to have made a difference unfortunately. Here's my test flarum if you'd like to have a look at what's happening

      a month later

      Darkle this is a great extension, thanks, can it work in flarum 1.8.5?

        4 months later

        Capybara Gerriet the line comes from the Flarum built-in styling for the link (<a> tag)

        I don't know if your content includes a link wrapped around the image, or if the link is added by this extension? If the extension creates its own link, it could add a special class to it so the default Flarum styling could be disabled. Maybe it does already, I'm not familiar with the extension

          clarkwinkelmann Thanks for the explanation! I'm using FoF Upload, the extension creates a link from the computer image, you're right

          Capybara Hey, could you confirm if this custom CSS works for you?

          a[data-fancybox="responsive"] {
              border-bottom: none!important;
          }
            a month later

            1.1.4

            What's Changed

            Added the .Post-body class to the image selector. This change prevents conflicts with other extensions that add images outside of the post content.

            Introduced the .no-fancybox class, allowing developers to mark elements that should not be wrapped by Fancybox, thus enhancing compatibility with other extensions.

            The extension was causing conflicts with the user-decoration extension by mistakenly wrapping non-avatar image elements. The new selector limits the scope to only relevant post content.

            New Contributors

            Full Changelog: iamdarkle/fancybox1.1.3 → 1.1.4

            ♻ Update

            composer require darkle/fancybox
            php flarum cache:clear
            8 days later

            2.0.0

            Fancybox v5 by @iamdarkle in iamdarkle/fancybox10

            Screenshot

            Upgrade to Fancybox v5

            I’ve migrated the extension to the new version 5, which is a major rewrite with numerous improvements.

            Automatic galleries

            The update includes the new "Carousel" component, which works similarly to Post Galleries. It automatically creates a gallery from consecutive images separated by a line break. Also, fancybox and carousel are synced for a better user experience.

            Example gallery:

            ![](https://images.pexels.com/photos/62289/yemen-chameleon-chamaeleo-calyptratus-chameleon-reptile-62289.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1)
            ![](https://images.pexels.com/photos/33287/dog-viszla-close.jpg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1)
            ![](https://images.pexels.com/photos/50577/hedgehog-animal-baby-cute-50577.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1)
            ![](https://images.pexels.com/photos/1661179/pexels-photo-1661179.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1)
            ![](https://images.pexels.com/photos/406014/pexels-photo-406014.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1)

            Server-side rendering

            I’ve implemented server-side rendering to help avoid layout shift issues, especially with large galleries of over 50 photos, preventing CLS problems and DOM disruption.

            Full Changelog: iamdarkle/fancybox1.1.4 → 2.0.0

            ♻ Update

            composer require darkle/fancybox
            php flarum cache:clear
            GreXXL changed the title to Fancybox v5 (Lightbox and Galleries) .
            10 days later

            I upgraded to the latest version, only a little issue with it:
            after i clicked the picture, it zoomed in well, but when I press 'ESC' or click to close the image, i have to click 3 times to zoom out the image or exit the photo gallery.
            All other features are perfect. Anyone got the same issue?

              Mikenthuzi Yes, I confirm, I have the same problem. At first I thought that the problem was in my forum. I usually get tired of clicking and just reload the page.

                Mikenthuzi Capybara Sorry about the issue. If you prefer, you can roll back to the previous version until there's a fix by running this command:

                composer require darkle/fancybox:1.1.4
                php flarum cache:clear

                I haven't been able to reproduce it on my test Flarum site (where I'm only using core + fancybox and fof/upload, so it's pretty basic). If you could share your php flarum info, that would be great to check for any extension matching.

                  Darkle Here

                  Flarum core: 1.8.5
                  PHP version: 8.3.8
                  MySQL version: 8.0.35-0ubuntu0.20.04.1
                  Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, hash, fileinfo, filter, ftp, gettext, gmp, json, iconv, SPL, pcntl, session, standard, Phar, random, readline, Reflection, mbstring, shmop, SimpleXML, sockets, tokenizer, xml, mysqlnd, PDO, curl, dom, gd, intl, exif, mysqli, pdo_mysql, soap, xmlreader, xmlrpc, xmlwriter, zip, Zend OPcache
                  +-------------------------------------+---------+--------+
                  | Flarum Extensions                   |         |        |
                  +-------------------------------------+---------+--------+
                  | ID                                  | Version | Commit |
                  +-------------------------------------+---------+--------+
                  | flarum-likes                        | v1.8.0  |        |
                  | antoinefr-money                     | v1.3.1  |        |
                  | flarum-suspend                      | v1.8.1  |        |
                  | flarum-tags                         | v1.8.1  |        |
                  | flarum-flags                        | v1.8.0  |        |
                  | xypp-store                          | v1.1.5  |        |
                  | flarum-sticky                       | v1.8.0  |        |
                  | afrux-forum-widgets-core            | v0.1.7  |        |
                  | fof-user-directory                  | 1.3.3   |        |
                  | fof-byobu                           | 1.3.6   |        |
                  | flarum-bbcode                       | v1.8.0  |        |
                  | ziiven-money-transfer               | v0.2.5  |        |
                  | ziiven-decoration-store             | v1.1.2  |        |
                  | xypp-store-group                    | v1.0.2  |        |
                  | v17development-seo                  | v1.8.1  |        |
                  | the-turk-stickiest                  | 3.0.1   |        |
                  | nodeloc-split-view                  | 1.0.0   |        |
                  | neoncube-private-messages           | 1.3.0   |        |
                  | nearata-signup-confirm-password     | v3.1.1  |        |
                  | nearata-gif-avatars                 | 1.0.0   |        |
                  | migratetoflarum-canonical           | 1.0.0   |        |
                  | mickmelon-coloured-usernames        | 0.1.1   |        |
                  | litalino-more-bbcode                | 2.0.0   |        |
                  | justoverclock-welcomebox            | 2.0.2   |        |
                  | justoverclock-auto-post-count-badge | 1.0.0   |        |
                  | isaced-email-verification-switch    | 1.0.1   |        |
                  | ianm-boring-avatars                 | 1.0.0   |        |
                  | gtdxyz-badges                       | 1.0     |        |
                  | foskym-sorts-for-user-directory     | v0.3.2  |        |
                  | foskym-better-user-directory        | v0.1.2  |        |
                  | fof-user-bio                        | 1.4.0   |        |
                  | fof-upload                          | 1.5.5   |        |
                  | fof-socialprofile                   | 1.1.6   |        |
                  | fof-sitemap                         | 2.2.1   |        |
                  | fof-recaptcha                       | 1.3.4   |        |
                  | fof-reactions                       | 1.4.1   |        |
                  | fof-polls                           | 2.2.5   |        |
                  | fof-nightmode                       | 1.5.3   |        |
                  | fof-links                           | 1.2.3   |        |
                  | fof-linguist                        | 1.1.2   |        |
                  | fof-impersonate                     | 1.1.1   |        |
                  | fof-ignore-users                    | 1.2.1   |        |
                  | fof-forum-statistics-widget         | 1.2.1   |        |
                  | fof-formatting                      | 1.0.3   |        |
                  | fof-drafts                          | 1.2.11  |        |
                  | fof-disposable-emails               | 1.0.0   |        |
                  | fof-discussion-thumbnail            | 1.1.3   |        |
                  | fof-default-group                   | 1.1.2   |        |
                  | fof-bbcode-tabs                     | 1.0.3   |        |
                  | flarumite-simple-spoilers           | 1.0.0   |        |
                  | flarum-subscriptions                | v1.8.0  |        |
                  | flarum-statistics                   | v1.8.0  |        |
                  | flarum-pusher                       | v1.8.0  |        |
                  | flarum-nicknames                    | v1.8.0  |        |
                  | flarum-mentions                     | v1.8.3  |        |
                  | flarum-markdown                     | v1.8.0  |        |
                  | flarum-lock                         | v1.8.0  |        |
                  | flarum-lang-russian                 | 1.36.1  |        |
                  | flarum-lang-english                 | v1.8.0  |        |
                  | flarum-extension-manager            | v1.0.3  |        |
                  | flarum-emoji                        | v1.8.0  |        |
                  | davwheat-custom-sidenav-links       | 1.0.1   |        |
                  | datlechin-link-preview              | v1.5.0  |        |
                  | datlechin-copy-links                | v1.0.1  |        |
                  | darkle-fancybox                     | 2.0.0   |        |
                  | clarkwinkelmann-who-read            | 1.4.1   |        |
                  | clarkwinkelmann-roll-die            | 1.0.0   |        |
                  | clarkwinkelmann-money-to-all        | 1.0.0   |        |
                  | clarkwinkelmann-money-rewards       | 1.0.0   |        |
                  | clarkwinkelmann-group-list          | 1.0.0   |        |
                  | clarkwinkelmann-emojionearea        | 1.0.0   |        |
                  | clarkwinkelmann-comicsans           | 1.1.0   |        |
                  | blomstra-no-email-notifications     | 0.1.0   |        |
                  | blomstra-fontawesome                | 0.1.5   |        |
                  | askvortsov-moderator-warnings       | v0.6.3  |        |
                  | askvortsov-markdown-tables          | v1.2.1  |        |
                  | afrux-online-users-widget           | v0.1.6  |        |
                  | afrux-news-widget                   | v0.1.1  |        |
                  | acpl-mobile-tab                     | 1.4.4   |        |
                  +-------------------------------------+---------+--------+
                  Base URL: https://forumspace.ru
                  Installation path: /var/www/hidden/data/www/forumspace.ru
                  Queue driver: sync
                  Session driver: file
                  Scheduler status: Неактивно
                  Mail driver: smtp
                  Debug mode: off

                  Thanks to the dev, I've been using it for a while and it works perfectly!

                  But with the most recent update to the “Galleries” feature would it be possible to add an on/off switch in the admin backend?

                  For example turn off Galleries so that posts across the site no longer automatically Galleries images?

                  Of course Galleries is a great feature!