I'm developing an plugin which downloads an image from an FTP server and places that image in a subfolder of the plugin (like:
:id is the id from which server the image is downloaded (multiple server support))
With n shortcode (like
[ftpimage id='id']) the image must be shown on the page/post/widget.
I use this code
$server->image = plugin_dir_path(__FILE__) . "download/" . $server->id ."/" .$server->ftp_file;
to get the path of the image, but that is not working, because
[image] contains the full path to the image like
How can I get the right path to the image, so I can use it to show the image?
echo '<img src="' . $server->image . '" />';