'WP Dynamic featured image sizing and position

I'm trying to get additional featured images to display in my sidebar with the "dynamic featured image" plugin, but i'm having some problems undertstanding how it all works since i'm not too familiar with php.

I would like to display the featured images in the sidebar and have them resize to the sidebar width and be stacked vertically. At the moment I got them inside the sidebar but they are their original sizes and next to each other horizontally.

Here's what i've got in my code so far:

    global $dynamic_featured_image;
    $featured_images = $dynamic_featured_image->get_featured_images( );

        foreach($featured_images as $featured_image) { 
            echo "<img src='".$featured_image['full']."'>"; 
        }
}
   while ( have_posts() ) : the_post();

   if( class_exists('Dynamic_Featured_Image') ) {
       global $dynamic_featured_image;
       $featured_images = $dynamic_featured_image->get_featured_images( );
       
       //You can now loop through the image to display them as required



   }
   
   endwhile;

Like I said i'm not too familiar with php so i'm probably missing a lot of code here to do what I want it to do. Any help would be appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source