Hot answers tagged

4

What you want to do is already baked into WordPress but just not frequently used. In either the classic or the block editor, click to add an image. Once you have the block upon, instead of uploading or pulling from existing images in your Media Library, click on Insert from URL. Now just paste the URL from wherever the image is being served. Just double ...


2

You can use the 'wp_get_attachment_image_attributes' hook add_filter( 'wp_get_attachment_image_attributes', 'image_attributes', 20, 2 ); function image_attributes( $attr, $attachment ) { // Get post parent $parent = get_post_field( 'post_parent', $attachment ); // Get post title $title = get_post_field( 'post_title', $parent ...


1

You can used this plugin Photonic for your requirement Photonic doesn’t just cover Google Photos – it allows you to add images from a range of services. Like the previous plugin, you’ll need to create API keys and authenticate with your Gooogle account in order to use it. Once you do, you are ready to add a gallery. As with the previous plugin, the photos ...


1

Gutenberg is applying a flex-grow: 1; to the items, which allow it to fill the space. You override this by pasting the following into your css. .blocks-gallery-grid .blocks-gallery-image, .blocks-gallery-grid .blocks-gallery-item, .wp-block-gallery .blocks-gallery-image, .wp-block-gallery .blocks-gallery-item { flex-grow: 0; } Ideally, you do this in ...


1

The reason they are curving is because they have a border-radius set to 5px. Go to Elementors edit gallery then click on the "style" tab and you should see border-radius there. Edit this to be "0 0 0 0" and it will make your corners straight.


1

Uploaded images are already posts, a gallery is just a list of post IDs with some display options In WordPress, when you upload an image it creates a post of type attachment, and these posts have URLs, templates, etc If you just link the gallery items to their attachment page rather than the media file you'll see this page. Then, you can add an attachment....


1

I don't think this is possible in Gutenberg for the gallery block. There still isn't a unified way to modify these types of settings for blocks either (the panel, typically on the right-side of a desktop screen, is collectively called the Inspector Controls)


1

Tomas's answer actually contain's the key to change default linking (for Gutenberg). Does not affect already created galleries. The best way how I was able to implement it, was creating a new edited variation of needed block (gallery), and set it as default. That way the old gallery was replaced by new, edited one. Register new variation by creating js file ...


Only top voted, non community-wiki answers of a minimum length are eligible