From your post what i understood is u need to show images saved in your plugin folder.if yes then you can go with plugin_url to link images in a plugin directoy without specifying the plugin folder name.
Example:
<?php
echo '<img src="' . plugins_url('/images/header-background.png', __FILE__) . '" > ';
?>
The ouput will be like
<img src="http://www.example.com/wp-content/plugins/my-plugin/images/header-background.png">.
If you are using the plugins_url() function in a file that is nested inside a subdirectory of your plugin directory, you should use like this:
<?php
echo '<img src="' . plugins_url( 'images/header-background.png' , dirname(__FILE__) ) . '" > ';
?>
If you want to know more about plugin_url() refer here
Related Posts:
- Flickr plugin that will display photos from multiple group pools? [closed]
- Is there a Image Gallery which will load all my posted Images like twitter’s image grid?
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- How can I make add_image_size() crop from the top?
- wp.media.view.ImageDetails – Save settings as HTML5 data-* attributes for image
- Conditionally enqueue a widget’s script/stylesheet in HEAD (only when present on page!)
- how to get path to images in the uploads folder to be used in a plugin
- Plugin upgrading: Widget settings
- How to custom crop each image size?
- Simple rich text editor in Text widget?
- Is it possible to “freeze” a WordPress blog?
- How to Delete All regenerated thumbnails but keep the original ones?
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- How to enable edit button in the theme’s customize UI?
- How to upload image with simple form?
- How can I make my custom shortcode work in a Custom HTML Widget?
- Resizing all images
- Using Advanced Custom Fields with WordPress and Lightbox
- Need to create a Theme demo site that features multiple themes
- Disable Specific Widgets on Selected Pages of a WordPress Website?
- Display (and manage) webcam images?
- Way to force media uploader use custom image size
- Adding a widget programmatically
- Cropping, Re-sizing and Saving images from one folder to another folder in wordpress
- How to make WordPress use protocol indepentent upload files?
- Automatically Import Image into Posts from URLs on the Web?
- Delete Custom Dashboard Widgets
- How can I attach images to a post from the media library?
- Override dynamic_sidebar() in plugin?
- How to pass JavaScript variable to PHP in wordpress widget?
- Is dynamic forms/entries possible in Widget?
- How do I add a widget programmatically to a newly created site (WPMU) within a plugin?
- How To Add an Extra Field in All WordPress Available Widgets?
- How to place random widgets in the WordPress sidebar?
- Override Widget class in plugins with custom plugin
- Using the media uploader in a custom plugin
- Has anyone been able to get the aweber plugin to work
- How to create a widget or plugin to add custom content to my website?
- Pages with 2 Columns
- How do I change the description of the same image which is to be found in multiple instances?
- WordPress widget / plugin….fields not appearing in my widget
- How to select featured images for 1500 posts?
- Rename existing old uploaded images containing accented French characters (not during upload)
- Custom Widget outputs the input but doesn’t save anything inside the textarea
- Can I ignore caching of a plugin in W3 Total Cache? [closed]
- Why is the unrendered widget number `__i__` showing up in the JavaScript but not in the HTML?
- Thumbnail with different sizes
- Custom Widget Creating PHP Exception When Placed In Its Own PHP File
- Remove Widgets in Dashboard
- register child class in another plugin
- How to extract images of post and pages excluding header and logo image in wordpress?
- Themes VS Plugins [duplicate]
- Use Media Uploader in Plugin
- Changing widget options via the functions.php when there are no hooks
- Conditional Display of Links in Widgets
- How can I retrieve data within my widget
- How to Get Admin Settings for a widget when using the_widget() with custom widget
- How to unregister a widget from a child theme
- Upload images from custom plugin using the media modal
- WordPress multiple widget in single plugin
- Created Widget Not Showing up on Admin Panel
- Disabling post images for not logged in users
- resize only height using wp_get_image_editor
- How to upload thousands of images?
- How do I register a stylesheet inside a WordPress widget?
- Setting up widgets in wordpress with a unique ID for the after_title argument
- Generated Images sizes do not match Media Settings Image Size
- How to exclude a widget from page 1 of a paginated post
- Converting a simple plugin to be placed inside of functions.php
- Get uploaded image url
- Detect if a plugin was included in a certain page
- There’s some way to add a wrapper around posted images?
- How to get CMB2 to show a single image at a specific size
- Layout shop page: resize images and columns
- How to crop image from center using wp_image_editor
- How to show category images (from plugin) on a regular page (page-example.php)?
- Saving/Writing/Adding file to upload folder
- How to get popular post from across a network?
- How to limit 1 image per post on homepage only?
- Are there plugins that interfere with the admin part of Rss widget?
- How to change Thumbnail size of next Gen Gallery plugin?
- how can i limit the number of instances for my widget
- Dashboard Widget Form
- I need some direction on how to have a sidebar based on meta rather than page
- How to remove the whitespace in image name and save the new file
- Getting media library popup in custom plugin admin page
- How to change ID of an attachment in wp_posts and its related tables correctly?
- How do I create a full-bleed background image on text mouseover? [closed]
- How can I reuse the WordPress search form for a custom plugin / widget?
- bulk change of image setting “link to” to “link to: image url “
- Admin Dashboard with Custom Tab for Client
- Multisite Widget/Content
- Passing $this->get_field_name() to javascript
- Converting Attachment to Images?
- Is there plugin to show recent posts from one website in the widget area of another?
- Bulk Image Uploader to create new post from each image [closed]
- Regenerate images with automatic ALT and TITLE attributes
- Can I use a form in a dashboard widget?
- Is it possible to insert images directly from the server?
- How to add a random image to a post from gallery and only show one?