Title: Setting image width
Last modified: August 20, 2016

---

# Setting image width

 *  Resolved [enigmaverse](https://wordpress.org/support/users/enigmaverse/)
 * (@enigmaverse)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/setting-image-width/)
 * I’ve got a every specific design in mind for use with this widget… my php skill
   are weak, but I can generally figure most things out.
 * I’d like to set the image size to a specific height and width (this would be 
   a great addition to your setting btw). I’ve changed the the image type from “
   picture” to “source” per the graph API, but I cant figure out how to set my height
   and width.. every thread I come upon says to set it in the url with JSON but 
   your control isnt set up that way and just configuring it in the img tag distorts
   it.
 * It appears I’m still not getting the larger source image either… any assistance
   you can provide would be wonderful.
 * [http://wordpress.org/extend/plugins/recent-facebook-posts/](http://wordpress.org/extend/plugins/recent-facebook-posts/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [dsbrennan](https://wordpress.org/support/users/dsbrennan/)
 * (@dsbrennan)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/setting-image-width/#post-3593709)
 * I’m interested in how to get a larger source image as well. I can set the width
   to 100% of the column using CSS, but that doesn’t help without a larger image
   to start with.
 *  Thread Starter [enigmaverse](https://wordpress.org/support/users/enigmaverse/)
 * (@enigmaverse)
 * [13 years ago](https://wordpress.org/support/topic/setting-image-width/#post-3593712)
 * I’ve got the same issue. It looks like he is grabbing the “picture” field from
   the open graph post object, but for some reason its only returning thumbnail 
   size. I started digging into a month ago, but needed to move on to keep a project
   on schedule…
 * if we could somehow reference the photo object type it would give us the ability
   to scale the images. A setting on the tools page would be nice too.
 *  [ykruger1](https://wordpress.org/support/users/ykruger1/)
 * (@ykruger1)
 * [13 years ago](https://wordpress.org/support/topic/setting-image-width/#post-3593717)
 * Same issue here…
 *  [gnome11](https://wordpress.org/support/users/gnome11/)
 * (@gnome11)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593720)
 * Here is a work around:
 * Add this line of code right before the image output in class-rfb.php:
    `$post['
   image'] = str_replace("_s.jpg","_n.jpg",$post['image']);`
 * (at least before here:
    `$output .= '<p class="rfb_image"><a target="_blank" 
   href="'. $post['link'] . '" rel="nofollow"><img src="'. $post['image'] . '" alt
   ="" /></a></p>';` )
 * Somehow a larger picture is returned when ends as “_n.jpg”!
 *  [eagerbob](https://wordpress.org/support/users/eagerbob/)
 * (@eagerbob)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593721)
 * Thanks Gnome, but it did not work for me.
 * I added your code right above the line you gave, but I still get the smaller “
   s.jpg” image. I did refresh the cache but to no avail.
 *  [gnome11](https://wordpress.org/support/users/gnome11/)
 * (@gnome11)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593722)
 * oh, eagerbob how do you add the shortcode into your site? When using the widget
   the resize trick didn’t work, but putting the shortcode on the page/post did.
   So to add the larger images into a sidebar I used a text widget and got it to
   work.
    And curious, if you open the image link in a new window and manually change
   the _s to _n at the end of the image name, you get a larger photo, correct?
 *  [eagerbob](https://wordpress.org/support/users/eagerbob/)
 * (@eagerbob)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593723)
 * [@gnome](https://wordpress.org/support/users/gnome/): Ah, I see, I used the widget.
 * Yes, I did try to manually change the _s to _n in the image URL and indeed the
   bigger picture shows.
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593728)
 * Hey everone,
 * This indeed seems like a nice setting to be included in a future version of RFB,
   I’ll keep you guys updated.
 *  [envynailspa](https://wordpress.org/support/users/envynailspa/)
 * (@envynailspa)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593729)
 * [@gnome11](https://wordpress.org/support/users/gnome11/) Sorry I’m new with this
   but I’m not sure what you mean when you wrote When using the widget the resize
   trick didn’t work, but putting the shortcode on the page/post did. So to add 
   the larger images into a sidebar I used a text widget and got it to work.
 * > . Can you please help with a little more details ?
 *  [Jakwikst](https://wordpress.org/support/users/jakwikst/)
 * (@jakwikst)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593730)
 * Thanks, your solution worked very well! This is simple the best facebook plugin.
   Very nice work.
 *  [gnome11](https://wordpress.org/support/users/gnome11/)
 * (@gnome11)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593731)
 * [@envynailspa](https://wordpress.org/support/users/envynailspa/) I believe, you
   can either use this plugin by 1) adding the plugin widget to your site or 2) 
   adding shortcode to a page or post. When I learned about the resize trick above,
   I noticed it only worked (returned the larger image) when adding the shortcode
   to a page or post, not while using the widget.
 * So it is important to see how you are using the plugin.
    If the code was added
   correctly, the fix above should work fine if you added shortcode to a page, for
   example `[recent-facebook-posts number=7 likes=0 comments=0 excerpt_length=250]`.
   If you are using the Recent Facebook Posts Widget in a sidebar, the fix may not
   work. If it is not working for you, replace the Widget with a text widget that
   enter the shortcode as above, for example.
 *  Plugin Author [Danny van Kooten](https://wordpress.org/support/users/dvankooten/)
 * (@dvankooten)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593732)
 * Hi everyone,
 * Please try updating to 1.2.2, I’ve added an option where you can specify which
   image size to load as well as image and height options.
 * Let me know how they work for you. All suggestions are welcome. : )
 * **PS. Renew the cache after changing the preferred image size.**
 * Thanks, Danny.
 *  [Jakwikst](https://wordpress.org/support/users/jakwikst/)
 * (@jakwikst)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593733)
 * Hi, it works very well. Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Setting image width’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/recent-facebook-posts_eae9f9.svg)
 * [Recent FB Posts](https://wordpress.org/plugins/recent-facebook-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/recent-facebook-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/recent-facebook-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/recent-facebook-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/recent-facebook-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/recent-facebook-posts/reviews/)

 * 13 replies
 * 8 participants
 * Last reply from: [Jakwikst](https://wordpress.org/support/users/jakwikst/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/setting-image-width/#post-3593733)
 * Status: resolved