0

When I paste in an images URL from Flickr into a wordpress post it auto embeds it into the post. Somehow it is getting set to a default width of 500px. How/where do I change this? I just can't find any documentation for it, arg!

Note: I am using the twentyten theme.

EDIT:

To clarify, this is not a stylesheet issue.

If I paste this into a post:

http://www.flickr.com/photos/davebryan/5755930575/

Wordpress auto embeds it and changes it to this:

<img width="500" height="331" alt="" src="http://farm6.static.flickr.com/5267/5755930575_eee9e7c727.jpg">

Where is it getting the width and height?

Dave
  • 8,879
  • 10
  • 33
  • 46

4 Answers4

5

It's auto-embedding http://codex.wordpress.org/Embeds using http://oembed.com via the file wp-includes/class-oembed.php

You can uncheck autoembedding in Administration > Settings > Media SubPanel and set maximum width and height.

You can also use a shortcode for size, i.e.: [embed width="123" height="456"]...[/embed]

markratledge
  • 17,322
  • 12
  • 60
  • 106
  • Sorry but I can't find anything in that file to change the width. I am now thinking that it is on Flickr's side of things which is returning images at 500px wide. I don't know if its possible to change that. If I'm just missing something and you DO know how to change the width in that file could you please explain? Thanks! – Dave Jun 07 '11 at 16:06
  • My point is that you don't change anything in class-oembed.php or look to Flickr to change something. You change the embed width by using the shortcode or by making settings in Administration > Settings > Media SubPanel – markratledge Jun 07 '11 at 19:07
0

Try this:

#content img {
    margin: 0;
    height: auto;
    max-width: 640px;
    width: auto;
}

Also see here: http://wordpress.org/support/topic/twenty-ten-11-ignoring-image-width-resizing

markratledge
  • 17,322
  • 12
  • 60
  • 106
MLS1984
  • 307
  • 2
  • 6
  • 21
0

Beside markratledge's answer I've noticed that when you go to flickr link in the sharing area in the top of the website you can press "More ways to share" it will show you option "Grab the HTML/BBCode" there you will see the autoembedded code that moved to the editor.

In order to de-activate this feature you can follow markratledge's answer.

markratledge
  • 17,322
  • 12
  • 60
  • 106
Mohamed Amgad
  • 195
  • 1
  • 2
  • 12
  • I know their are other ways to embed an image, that's easy enough, but I'm trying to simplify workflow for my client who is posting TONS of photos to wordpress. – Dave Jun 07 '11 at 16:00
0

In addition to markratledge's answer, Twenty Ten also sets the content width in the themes function.php file. See line 47, and update accordingly.

if ( ! isset( $content_width ) )
$content_width = 640;
markratledge
  • 17,322
  • 12
  • 60
  • 106
addedlovely
  • 3,076
  • 3
  • 22
  • 37