Skip Navigation

[Resolved] Auto generate AND SAVE image from URL custom field using "mshot" (dynamic url)

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 7 years, 5 months ago.

Assisted by: Beda.

Author
Posts
#532038

I am looking for some help / guidance to do a pretty specific thing.

I have looked extensively and found some people online asking the same question but with no answers.

There is a WordPress tool available that makes it pretty easy to display a screenshot of a URL using the following:

hidden link + [ URL-encoded URL ] + ?w=###
(example: hidden link)

And while you can use this to display the screenshot, I want to go a step further and save this image locally after it is generated. Here is the situation:

I have a custom post type 'Video' that contains a field 'URL'

What I would like to happen is the following:

1. User publishes a ‘Video’ containing a URL (using a CRED form)
2. Screenshot of that URL is generated
2a) the tool I mentioned above takes a couple minutes to generate the image. While it is being
generated the dynamic mshot url displays a default loading GIF. For that reason, the function somehow has to know when the screenshot is ready.
3. Said screenshot is saved locally
4. Local screenshot is used as featured image for the post

Any information on how I should go about doing this would be helpful.

Please let me know if anything is unclear or more information is needed.

Thanks.

#532144

I don't know the code, or how that Service you use, works.

Clear is, this is not within Toolset features or support.

You can let users submit and URL of course, using CRED.
I assume you know how to do that, otherwise please let me know, I can point to DOC's and give instructions.

Then, if you generate an image from that URL later on, it is fully up to that service to determine where, when and how data is stored.
I suspect that data is never stored on your Server but comes from an Online Service.

As such it would somehow need a communication between that service and your Installation, and that is not done by Toolset, as such, we cannot assist a custom code that interacts with their API if they have one.

With Toolset, I would recommend using a ScreenShot that a user uploads in the Form.

The forum ‘Types Community Support’ is closed to new topics and replies.