wp_get_attachment_url images in wrong order [closed]

Gallerys aren’t implemented the way you’re pulling in images, the images in a gallery might not be attached to the post at all. get_attached_media will give you the images attached to the post by the order of their ID. This means: Images you added to the post, then deleted will be in this array Images … Read more

Not seeing text alignment option in Image block

Using the Align options you found (Align left, Align center, Align right) is often the easiest way to allow text to flow around your images in your WordPress posts. Add the Image Select Align right in Image options Add some text (puts Image in Paragraph block) Adjust the width of the Image block so the … Read more

css to fit image by HEIGHT

Try giving your image a max-width instead of max height. img { width:100%; max-width:500px; /* this will stop it from expanding when you widen the browser height:auto; /* height will automatically adjust to width. } You didn’t give any specifications on if you image is a square or nested in a square div, but if … Read more

HTML showing after PHP code in tag

This is because the_post_thubmnail() outputs an <img> tag. So the result of your code will be something like this: <div class=”bio-picture”> <img url=”<img src=”https://wordpress.stackexchange.com/questions/366208/thumbnail/image/url.jpg” class=”wp-post-image attachment-full”>” class=”headshot”> </div> Your screenshot is how the browser has chosen to handle that broken HTML. If you want to output the post thumbnail <img> with a custom class, use … Read more

Image text wrap not working properly on frontend

Your container div for the content area has a class of .row, which is set to display:flex in Bootstrap. Direct children of a parent with display:flex can’t be floated. To fix this you’ll either need to update the .row class so it’s not set to display:flex (display:block works for me), or add an interior wrapper … Read more

What sense makes medium_large_size_h => 0?

It appears that it’s eventually used as a parameter to wp_constrain_dimensions where ‘0’ means ‘no limit’. It’s only used directly in media.php:85 } elseif ( ‘medium_large’ === $size ) { $max_width = intval( get_option( ‘medium_large_size_w’ ) ); $max_height = intval( get_option( ‘medium_large_size_h’ ) ); if ( intval( $content_width ) > 0 ) { $max_width = … Read more

Disable posts generated from image uploads

There are a few ways to do this with updates to functions.php as well but the easiest might be to first install Yoast plugin and then use the setting for Attachment URLS that redirect it to the parent post https://yoast.com/media-attachment-urls/

How to force WordPress to upscale images?

You can always use the full size, but if the issue is that your images don’t cover enough area, you can fix that with CSS and the background-size and object-fit parameters. This will let you use img tags that are larger than the source image, or background images smaller than their container, and allow you … Read more