How do I add an image to a gallery as the first image, not last
-
I’ve got a gallery block, which I can add images from my media library to quite easily. The problem is, I’ve dozens of photos in there already, when I add another image to the gallery, it is automatically put to the end, I don’t want to press the left arrow numerous times to get it as the first image. Is there any way to do this automatically?
ThanksThe blog I need help with is: (visible only to logged in users)
-
Hi @satkin2! Good question! I was able to find the Edit Gallery button:
1) Select the gallery block (use the block navigator at the top if you need to)
2) Scroll to the bottom of your gallery. Notice Media Library. Add the image (or upload) there
3) Look on the left and you’ll see an Edit Gallery. There you can drag and drop.
I’ll note this case too, since it took me a bit to figure that out, and in fact I only found it when I started to file a feature request :)
I had some other thoughts in the meantime: You could use the “tiled gallery” block instead. Its edit feature is a bit easier to find – it’s the pencil in the gallery’s top toolbar. To change to a Tiled Gallery, click the gallery icon and you’ll have an option to pick a different type of block.
Also, for what it’s worth? If you’re going to have a gallery large enough that it would be difficult to re-order using arrows, and one that you’ll be editing frequently, have you thought about adding those as blog posts instead, then displaying the posts as a gallery of sorts? That way when you add new stuff, your followers will be notified. And that’s a great way to build traffic for your site. Plus: if someone visits from a cellular connection and a huge gallery downloads, their phone may not perform well, and if they have data limits it could cost them. Displaying those as posts instead helps.
I hope that helps a bit!
-
Oh! Also, here’s the issue I found:
https://github.com/WordPress/gutenberg/issues/24578It points out an option to inverse the gallery’s order. Maybe you could invert, add the image, then re-invert?
Still, if you’re looking for a last-is-first option, I’d recommend using blog posts instead, then using blocks or your theme to display those like a gallery, maybe like this theme does: https://baskerville2demo.wordpress.com/
- The topic ‘How do I add an image to a gallery as the first image, not last’ is closed to new replies.