开发者

How to post a dynamic image to wordpress post?

开发者 https://www.devze.com 2023-03-09 02:29 出处:网络
I want to put a image into a post, 开发者_StackOverflow中文版but it seems I just cannot get it work.

I want to put a image into a post, 开发者_StackOverflow中文版but it seems I just cannot get it work. For example, this one: http://stockcharts.com/c-sc/sc?s=ACHN&p=D&b=5&g=0&i=t88400486500&r=9913

The output is a PNG file. So in HTML tab, i put, < img src="http://stockcharts.com/c-sc/sc?s=ACHN&p=D&b=5&g=0&i=t88400486500&r=9913">,(I leave a empty space between the < and image otherwise, stackoverflow won't allow me to put a image tag here) it just won't show up the correct image. The image you will see is "go to stockcharts.com to view this chart", that is because the URL is wrong. If the URL is correct, the image will display fine. Any way to work around? I was trying to play around with the formatting.php file, but so far, no luck. (It is quite strange though, if you put the URL into your IE URL bar, and press enter, it shows up fine with a chart.)

Thanks.


Your URL is a web page, NOT an image. When you try to insert the link as an image, the html IMG tag is used to specify the FILE NAME to be inserted. The file can be on a different url but it should not refer to just another uri.

to get around it, you have 4 options:

  1. Specify the image file name directly and not the uri with the img tag.
  2. Use iframe and put the uri
  3. use frame (I'd not go for this)
  4. Use Ajax and fill it in a DIV tag - most effective in my opinion.
0

精彩评论

暂无评论...
验证码 换一张
取 消