Placing a video screenshot with a template tag
Playing a video directly inside a newsletter is not possible. However, a screenshot of the video with a play button overlay works well. As soon as the reader clicks on it, their browser opens and plays the video without any issues.
In a custom HTML template, you can insert such a screenshot using the <lp-video> tag. If you are working with the drag & drop editor, use the ‘Video’ block instead: see Video in your newsletter.
Placing a video screenshot with <lp-video>
Laposta only needs a link to the video on YouTube or Vimeo. The screenshot is inserted automatically, and you can enlarge or reduce its size if needed. If there are black bars in the YouTube screenshot, you can read how to fix this in Video in your newsletter.
By default, the screenshot links to the specified URL of the video. You can also enter a different URL in the editor. This is useful if the screenshot comes from YouTube, but the video itself is hosted elsewhere, such as on your own website. If the video tag is placed inside an <a> tag, the editor uses that link as the default value.
Attributes
Only lp-width is required. The other attributes determine what you can edit in the editor.
Required. Specifies how wide the screenshot should be.
The value of this attribute is displayed in the editor above the area where you can change the video.
When filling in the template, the editor can enter a link to a video themselves. If you want to show a default video straight away, enter the link here.
Include this attribute if the size of the screenshot may be adjusted in the editor.
Specifies the maximum width to which the screenshot may be enlarged.
Specifies the minimum width to which the screenshot may be reduced.
By default, you can place a link behind the screenshot. If you do not want this, include this attribute.
Example
By default, this code shows a screenshot of the video in lp-src, with a custom link behind it. The screenshot is 300 pixels wide and can be resized between 200 and 400 pixels.