Website screenshots as images for posts

WordPress.org offers interesting and not officially documented feature allowing you to get screenshots from any URL. There are not many options available, but for most things it will work just fine and save you a lot of time to make such sreenshots yourself. So, here is how to use it with xScape theme.

Through Interface

Here is the screenshot of the image box for the post from post edit page. We have screenshot of the www.google.com website:

Screenshot from URL
Screenshot from URL

As you can see, it’s easy to add it. In the field you enter screenshot, add one empty space and than URL from which to get the screenshot. For most uses, xScape will use appropriate width for the screenshot, but you can also specify the width and it will be used always. To do that, after word screenshot add width like this: screenshot:600. Maximum allowed width is 1024, and it’s limit of the WordPress screenshot service. All images are in 4:3 format, with maximum image size allowed 1024×768. Height can’t be specified. Returned image will be JPEG.

But, sometimes WordPress.org can need some time to make screenshot, so you will need to wait a bit before image appears for the first time. Until they make screenshot, a black animated GIF will be returned. Images are cached for a period of few days, and that will ensure that you always see current (or almost current) version of the screenshot.

Shortcode

You can also use a shortcode for this anywhere in the post content. Parameters for the shortcode are in the documentation. Here are few examples on how to use it. First example will add Google screenshot, 320px wide, alight to right:

[xss_webshot url="http://www.google.com/" width=320 align="right"]

Same thing, but with the caption text and link for the image:

[xss_webshot url="http://www.google.com/" width=320 align="right" link=true]Google Search[/xss_webshot]

Really simple.

Comments

Leave a Reply