WordPress以编程方式重新生成缩略图

时间:2018-03-09 17:25:02

标签: php wordpress thumbnails

我创建了一个C#桌面APP,它使用insert into命令在我的WP页面上创建产品。

我以编程方式创建wp_posts和wp_postmeta,我可以看到我的产品和与产品相关的图像没有任何问题。但是,我的'缩略图'有问题

我做了一个快速研究,发现我可以使用Regenerate Thumbnails Plugin

重新生成缩略图

我想知道我有没有机会使用我的一个php文件运行这个插件? (或者直接从我的C#桌面应用程序使用Web请求或类似的东西调用它?)

有什么建议吗?

1 个答案:

答案 0 :(得分:0)

I suggest you to create API for your desktop app. when desktop app will send http request wordpress will create post and upload image with all necessary thumbnails.