How to use thumbnails in gallery?












1















Since Wordpress 5.x they've removed the thumbnail size option for galleries. Is there a way to activate or build a workaround? I like to build up a classic Lightbox gallery.



enter image description here










share|improve this question



























    1















    Since Wordpress 5.x they've removed the thumbnail size option for galleries. Is there a way to activate or build a workaround? I like to build up a classic Lightbox gallery.



    enter image description here










    share|improve this question

























      1












      1








      1


      1






      Since Wordpress 5.x they've removed the thumbnail size option for galleries. Is there a way to activate or build a workaround? I like to build up a classic Lightbox gallery.



      enter image description here










      share|improve this question














      Since Wordpress 5.x they've removed the thumbnail size option for galleries. Is there a way to activate or build a workaround? I like to build up a classic Lightbox gallery.



      enter image description here







      functions theme-development gallery






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 15 hours ago









      PetePete

      1085




      1085






















          2 Answers
          2






          active

          oldest

          votes


















          2














          There is a project going on about the image sizes. You can follow it right here.



          Right now, you can try using shortcode_atts_gallery filter. Take a look at these codes to get a hint:



          /* Register shortcode_atts_gallery filter callback */
          add_filter( 'shortcode_atts_gallery', 'meks_gallery_atts', 10, 3 );

          /* Change attributes of wp gallery to modify image sizes for your needs */
          function meks_gallery_atts( $output, $pairs, $atts ) {

          /* You can use these sizes:
          - thumbnail
          - medium
          - large
          - full
          or, if your theme/plugin generate additional custom sizes you can use them as well
          */

          $output['size'] = 'medium'; //i.e. This will change all your gallery images to "medium" size

          return $output;

          }


          You can find more information about shortcode_atts_gallery right here.






          share|improve this answer
























          • Nice idea but that is for Wordpress 4.x ... There is no gallery tag using anymore. Its a new WYSIWYG Block Editor Element.

            – Pete
            13 hours ago





















          0














          It's an ongoing process. Right now there is not a way to adjust manually the image sizes on the gallery block. It is being discussed by the WordPress core development community on this github issue.



          Just because the default gutenberg gallery block does not allow you to do it does not mean you cannot install a 3rd party plugin, create a custom block yourself (I recommend using ACF Custom Blocks), or reverting to the classic editor for this specific use.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "110"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f328195%2fhow-to-use-thumbnails-in-gallery%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            There is a project going on about the image sizes. You can follow it right here.



            Right now, you can try using shortcode_atts_gallery filter. Take a look at these codes to get a hint:



            /* Register shortcode_atts_gallery filter callback */
            add_filter( 'shortcode_atts_gallery', 'meks_gallery_atts', 10, 3 );

            /* Change attributes of wp gallery to modify image sizes for your needs */
            function meks_gallery_atts( $output, $pairs, $atts ) {

            /* You can use these sizes:
            - thumbnail
            - medium
            - large
            - full
            or, if your theme/plugin generate additional custom sizes you can use them as well
            */

            $output['size'] = 'medium'; //i.e. This will change all your gallery images to "medium" size

            return $output;

            }


            You can find more information about shortcode_atts_gallery right here.






            share|improve this answer
























            • Nice idea but that is for Wordpress 4.x ... There is no gallery tag using anymore. Its a new WYSIWYG Block Editor Element.

              – Pete
              13 hours ago


















            2














            There is a project going on about the image sizes. You can follow it right here.



            Right now, you can try using shortcode_atts_gallery filter. Take a look at these codes to get a hint:



            /* Register shortcode_atts_gallery filter callback */
            add_filter( 'shortcode_atts_gallery', 'meks_gallery_atts', 10, 3 );

            /* Change attributes of wp gallery to modify image sizes for your needs */
            function meks_gallery_atts( $output, $pairs, $atts ) {

            /* You can use these sizes:
            - thumbnail
            - medium
            - large
            - full
            or, if your theme/plugin generate additional custom sizes you can use them as well
            */

            $output['size'] = 'medium'; //i.e. This will change all your gallery images to "medium" size

            return $output;

            }


            You can find more information about shortcode_atts_gallery right here.






            share|improve this answer
























            • Nice idea but that is for Wordpress 4.x ... There is no gallery tag using anymore. Its a new WYSIWYG Block Editor Element.

              – Pete
              13 hours ago
















            2












            2








            2







            There is a project going on about the image sizes. You can follow it right here.



            Right now, you can try using shortcode_atts_gallery filter. Take a look at these codes to get a hint:



            /* Register shortcode_atts_gallery filter callback */
            add_filter( 'shortcode_atts_gallery', 'meks_gallery_atts', 10, 3 );

            /* Change attributes of wp gallery to modify image sizes for your needs */
            function meks_gallery_atts( $output, $pairs, $atts ) {

            /* You can use these sizes:
            - thumbnail
            - medium
            - large
            - full
            or, if your theme/plugin generate additional custom sizes you can use them as well
            */

            $output['size'] = 'medium'; //i.e. This will change all your gallery images to "medium" size

            return $output;

            }


            You can find more information about shortcode_atts_gallery right here.






            share|improve this answer













            There is a project going on about the image sizes. You can follow it right here.



            Right now, you can try using shortcode_atts_gallery filter. Take a look at these codes to get a hint:



            /* Register shortcode_atts_gallery filter callback */
            add_filter( 'shortcode_atts_gallery', 'meks_gallery_atts', 10, 3 );

            /* Change attributes of wp gallery to modify image sizes for your needs */
            function meks_gallery_atts( $output, $pairs, $atts ) {

            /* You can use these sizes:
            - thumbnail
            - medium
            - large
            - full
            or, if your theme/plugin generate additional custom sizes you can use them as well
            */

            $output['size'] = 'medium'; //i.e. This will change all your gallery images to "medium" size

            return $output;

            }


            You can find more information about shortcode_atts_gallery right here.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 15 hours ago









            Md. Ehsanul Haque KananMd. Ehsanul Haque Kanan

            30225




            30225













            • Nice idea but that is for Wordpress 4.x ... There is no gallery tag using anymore. Its a new WYSIWYG Block Editor Element.

              – Pete
              13 hours ago





















            • Nice idea but that is for Wordpress 4.x ... There is no gallery tag using anymore. Its a new WYSIWYG Block Editor Element.

              – Pete
              13 hours ago



















            Nice idea but that is for Wordpress 4.x ... There is no gallery tag using anymore. Its a new WYSIWYG Block Editor Element.

            – Pete
            13 hours ago







            Nice idea but that is for Wordpress 4.x ... There is no gallery tag using anymore. Its a new WYSIWYG Block Editor Element.

            – Pete
            13 hours ago















            0














            It's an ongoing process. Right now there is not a way to adjust manually the image sizes on the gallery block. It is being discussed by the WordPress core development community on this github issue.



            Just because the default gutenberg gallery block does not allow you to do it does not mean you cannot install a 3rd party plugin, create a custom block yourself (I recommend using ACF Custom Blocks), or reverting to the classic editor for this specific use.






            share|improve this answer




























              0














              It's an ongoing process. Right now there is not a way to adjust manually the image sizes on the gallery block. It is being discussed by the WordPress core development community on this github issue.



              Just because the default gutenberg gallery block does not allow you to do it does not mean you cannot install a 3rd party plugin, create a custom block yourself (I recommend using ACF Custom Blocks), or reverting to the classic editor for this specific use.






              share|improve this answer


























                0












                0








                0







                It's an ongoing process. Right now there is not a way to adjust manually the image sizes on the gallery block. It is being discussed by the WordPress core development community on this github issue.



                Just because the default gutenberg gallery block does not allow you to do it does not mean you cannot install a 3rd party plugin, create a custom block yourself (I recommend using ACF Custom Blocks), or reverting to the classic editor for this specific use.






                share|improve this answer













                It's an ongoing process. Right now there is not a way to adjust manually the image sizes on the gallery block. It is being discussed by the WordPress core development community on this github issue.



                Just because the default gutenberg gallery block does not allow you to do it does not mean you cannot install a 3rd party plugin, create a custom block yourself (I recommend using ACF Custom Blocks), or reverting to the classic editor for this specific use.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 15 hours ago









                tmdesignedtmdesigned

                198110




                198110






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to WordPress Development Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f328195%2fhow-to-use-thumbnails-in-gallery%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    If I really need a card on my start hand, how many mulligans make sense? [duplicate]

                    Alcedinidae

                    Can an atomic nucleus contain both particles and antiparticles? [duplicate]