如何创建存储在数据库中的 html 内容的缩略图

发布于 2024-10-04 18:07:22 字数 123 浏览 0 评论 0原文

如果您要将此 html 内容转换为小缩略图,您会怎么做?

PS 我试图这样做是为了允许我网站上的用户浏览他们的帖子(包含 html 元素(例如,strong、i、img 标签))。

If you were to convert this html content into a small thumbnail image , how would you do it?

P.S. I'm trying to do this to allow users on my site to browse through their posts(containing html elements (e.g. strong, i, img tag's).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

笙痞 2024-10-11 18:07:22

请参阅此处:

http://www.thumbalizr.com/index.php

他们有一个相当不错的简单的API

使用 API 的简单语法:
http://api.thumbalizr.com/?url =http://www.ford.de&width=250

参数:

检查http://api.thumbalizr.com
更多详细信息。

因此,您只需

另请参阅http://www.websnapr.com/ 及其 实施页面

See here:

http://www.thumbalizr.com/index.php

They have a pretty decent simple API

Simple syntax to use the API:
http://api.thumbalizr.com/?url=http://www.ford.de&width=250

Parameter:

Check http://api.thumbalizr.com for
more details.

So you can simply have <img src='http://api.thumbalizr.com/?url=http://www.yourdomain.com&width=250' />

Also see http://www.websnapr.com/ and their implementations page

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文