you should have a look to this blog post : http://www.maverick.it/tech/create-thumbnails-using-wordpress-built-in-functions
then, if you can’t use a remote image, just download it as a temporary file on your server, process and delete it.
One your image created, you should then insert it as an attachment (http://codex.wordpress.org/Function_Reference/wp_insert_attachment) and set it as the post thumbnail (http://codex.wordpress.org/Function_Reference/set_post_thumbnail)
I hope it will help.
Cyril.
Related Posts:
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- Redirect to another page using contact form 7? [closed]
- Upload Image with a file URL and show dynamically on Frontend
- Update plugin from personal API
- Does a plugin’s “main” file need to be named the same as the folder containing it?
- Symlinked plugin directory doesn’t appear in Admin
- enqueue script only if it is not already enqueue
- How can I limit functionality in one version of a plugin?
- How can I include a setting that has a variable number of values in a settings page using register_setting?
- What is $tab in `install_plugins_{$tab}` hook?
- Meteor Slides as header only for homepage and Use featured image of each page as header for respective pages
- Is it possible to upload a template file to a directory that can be used by all themes?
- WordPress hook for visiting a post
- Fatal error: Class not found in
- How do I use WordPress PHP functions in my Javascript code?
- Creating a modal dialog without jQuery
- Language Translation is not working?
- What user roles should have wp_unique_post_slug_is_bad_flat_slug filter applied?
- Passing $this->get_field_name() to javascript
- add_action in functions.php, do_action in plugin?
- Read text defined under __()
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Simple ajax call not working in wordpress plugin
- Plugin Options Not Saving to Database in WP 4.5
- How to save post change url youtube link?
- __callStatic method handler passed to add_action causes bug in PHP
- how to disable blockrenderAppender inside all Innerblocks?
- Redirection of users away from wp-admin (but not administrators)
- New databes tables with – WooCommerce – for developers [closed]
- Plugin-generated pages use Not Found or Pages Archive templates?
- Change commission_status paid when withdraw_status vendor is completed
- WordPress Plugin [closed]
- Add padding while generating thumbnail
- Proper way to replace the_content only for pages created by custom plugin
- Certain functions are undefined when called form mu-plugins
- Why is the ‘Gutenberg’ Plugin generating an ‘Inconsistent File Permissions’ error when other Plugins, with the same permissions, do not?
- Can plugin2 uninstall plugin1 at the very beginning of plugin2’s installation?
- WordPress front end AJAX. Return 0 :?
- plugin dev – minimum base css specificity?
- I changed font of wordpress dashboard but it is slow!
- Get Every Key & Value from Array then Display All in New Line
- WordPress 5.4 – How to prevent to enter only certain values in custom field
- Creating a functionality plugin to edit seriously simple podcasting
- Plugin temporary files and files to download via FTP
- DB Query not working in Plugin
- Make plugin php file called directly aware of WordPress?
- sending different email notification while registration based on user role
- How to add credit card validation check to wordpress [closed]
- Next Previous Post in wordpress with previous / next link with title?
- How to use existing hook in twentytwelve to all theme of wordpress?
- How to get a notification when the plugin is installed?
- WordPress Post HTML after Posting
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Settings options not showing up on Sub Menu page in WordPress plugin
- How to Get Category Name When Export Products
- Remove List Bullets
- Custom Meta box change size
- Could add_query_arg() redirect user to external site?
- How to set plugin auto-update Enabled by default?
- Custom plugin activation error
- The Build menu theme is frozen with the wordpress theme
- How to capture hidden values with Gravity Forms
- How to translate to spanish wordpress hardcoded content/files?
- what functions to use to resize images and create DB metadata for them after/during upload?
- Multiple image selection custom widget
- How to Create a Learning Management Plugin in WordPress to Manage Courses [LMS]
- How to prevent redoing get_posts queries and make results available to other scripts?
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- Paid Membership Pro displaying a user name in PHP
- Make another copy of a plugin and install it
- Store admin page into variable
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- WP Plugin CSS not being applied to page
- Overwriting Plugin’s Ajax callback function from theme
- How can I get the Post ID and Post Type within a Must Use Plugin?
- Creating Nested custom fields
- Unable to sync woocommerce variations
- Can’t find variable is_single in my jQuery plugin
- WordPress Cron function is not working
- WP internationalization not loaded
- Plugin hook breaks new WP 4.0 media library grid view?
- How to get site homepage from plugin?
- Adding custom cron_schedule prior to wp_schedule_event
- Get page type to display content
- Widget redirecting to home page
- Capturing POST data
- Is an Office a custom post type [closed]
- How to add image for custom taxonomy
- I am using multi image metabox plugin but I did get how to display the images in templete?
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- wordpress Ajax success doesn’t return the value
- How to open author url linked to a new tab in settings page in the WordPress plugin list
- How can I properly sanitize the update_option in WordPress?
- Why is my menu page not being displayed?
- add_meta_box showing blank screen in my page
- Plugin translations are not loaded from translate.wordpress.org
- Use inline callable for hooks and filters
- Error in using ‘admin_enqueue_scripts’ action through a class
- How do i fix this error?