How to use thumbnails in gallery?
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.
functions theme-development gallery
add a comment |
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.
functions theme-development gallery
add a comment |
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.
functions theme-development gallery
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.
functions theme-development gallery
functions theme-development gallery
asked 15 hours ago
PetePete
1085
1085
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
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
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered 15 hours ago
tmdesignedtmdesigned
198110
198110
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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