跳到内容

Browser Screenshots

v1.7.7

Kevin Leary · 2012年10月15日 上架

Automate the process of taking website screenshots.

正在使用
3,000+
评分
4.8 / 5
累计下载
11 万
最近更新
2024年1月30日
19 条评价需要 WordPress 4.0+已测试到 6.5.0

截图

New Gutenberg block.
New Gutenberg block.
A view from inside of the WordPress TinyMCE editor.
A view from inside of the WordPress TinyMCE editor.
The formatted front-end view of generated screenshots.
The formatted front-end view of generated screenshots.

Use the [browser-shot] shortcode to automate the process of taking website screenshots. An icon is also added to the TinyMCE editor to make the shortcode creation process easy.

The plugin uses the ‘mshots’ functionality, from WordPress.com, to automatically take screenshots of websites. This function is free for non-commercial use.

The images are stored on the wordpress.com servers and are not saved onto your own website. The images are cached for roughly 24 hours before being generated again.

Shortcode Preview

// basic shot 600px wide
[browser-shot url="https://link-to-website" width="600"]

// shot with link to other website
[browser-shot url="https://link-to-website" width="700" link="https://www.binarymoon.co.uk/"]

// shot with caption (uses default WordPress caption styles)
[browser-shot url="https://link-to-website" width="700"]Add Caption[/browser-shot]

Available Parameters

  • url (required) – the url of the link to shorten
  • width – the width of the image
  • height – the height of the image
  • alt – the image alt text
  • link – where the image links. Left blank it will point to the website where the screenshot is being taken
  • target – browser target. Set to _blank to open in a new window
  • class – add a class to the browsershots wrapper
  • image_class – change the default browsershots image class from alignnone to your chosen class
  • display_link (true or false – default true) to display a link in your screenshot
  • post_links (true or false – default false) to link to the permalink of the post the screenshot is on

Generating Screenshots with code

If you want to create screenshots in a theme using this plugin then you can do so using the BrowserShots::get_shot method.

For example:

<img src="<?php echo BrowserShots::get_shot( 'https://prothemedesign.com', 600, 450 ); ?>" />

Keep in mind that the plugin must be installed and activated for this to work.

The get_shot method has 3 parameters.

  1. The url.
  2. The width.
  3. The height.

The other parameters, from the shotcode, can be implemented manually when outputting the html.

Multisite Compatibility

The Browser Shots plugin is compatibly with WordPress Multisite, just use the Network Activate feature to enable the shortcode on every site. If you only want to enable the shortcode for a specific site, activate the plugin for that site only.

More…

  • The code can be found on Github
  • You can reach out to me with questions or problems on Twitter

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums