All Images on wordpress site broken

It’s due to AAM (Advanced Access Manager) plugin. You have different options to fix the issue. 1) Disable AAM Media Manager plugin 2) You can changes AAM Media Manager plugin version 3) If you do not want AAM to handle your website images, Go to the following file /advanced-access-manager/extension/AAM_Media_Manager/extension.php and find private $_skip = false; … Read more

Print specific image size in galley loop

You can define your own post thumbnail sizes add_theme_support( ‘post-thumbnails’ ); set_post_thumbnail_size( 150, 150 ); This means that you change the thumbnail size overall. Or you can define custom image sizes add_action( ‘after_setup_theme’, ‘wpdocs_theme_setup’ ); function wpdocs_theme_setup() { add_image_size( ‘category-thumb’, 300 ); // 300 pixels wide (and unlimited height) add_image_size( ‘homepage-thumb’, 220, 180, true ); … Read more

Modify Image Source With The_Content Filter?

Let’s give it a try: $str=”<img src=”http://myserver.mydomain/picture.png” />”; $pattern =’#<img src=”http://.*/(.*)” />#’; $replace=”<img src=”http://http://i0.wp.com/$1?quality=70&strip=all />””; $result = preg_replace($pattern, $replace, $str); The $pattern is quite simple and very specific. You might need to generalize it a bit more but it should show you the direction to go. E.g. it takes no care of possible whitespace. A … Read more

Fuzzy Images in WordPress 4.4

The new responsive images feature takes some tweaking to make it work optimally. The standard settings work only for the most basic of themes. Read up on responsive images, specifically the srcset and sizes attributes. Manipulate the srcset and sizes values through the new wp_calculate_image_srcset and wp_calculate_image_sizes filters. There’s also a max_srcset_image_width filter that allows … Read more

Set Post Image Using Shortcode

The Shortcode API is more geared for altering post content rather than performing actions in response to content, and as such tend to require more creativity to alter other post data – though it can still be done. Ultimately, using a shortcode to set a featured image is kind of bizarre considering that you can … Read more

How to decrease picture size

you will need to add this css to a child theme or install a custom css plugin .blackwell_top_image { height:400px; //change this to whatever height you want the image to be overflow:hidden; } It has to be done this way as the image width is set to 100% so setting a height on the image … Read more

How to display alt tags in img src?

You are using the Advanced custom fields plugin. The documentation for images: http://www.advancedcustomfields.com/resources/image/ To display the alt-tag for example, you can use this snippet: $image = get_field(‘image’); if( !empty( $image ) ) { $alt = $image[‘alt’]; … echo ‘<img src=”https://wordpress.stackexchange.com/questions/216629/…” alt=” . $alt .”>’ }

How to output images as figure/figcaption

add_theme_support( ‘html5’, array( ‘gallery’ ) ); or with another arguments such as search-form, comment-form, comment-list and caption, its call as Theme Markup Added gallery and caption support was introduced since WordPress version 3.9. As of version 3.9 WordPress uses <figure> and <figcaption> elements, instead of the generic definition list markup to output galleries. More on … Read more