because you are using the wrong function. You should use:
plugin_dir_url( __FILE__ ) . 'images/bag.png';
Also remove the extra forward slash before images:
/images
Related Posts:
- Where to store plugin settings fields
- How can I add an option to the Page Template list from a Plugin?
- What’s the best method for emptying an option created with the Settings API?
- template_include (overriding default plugin templates via current theme)
- Using composer for dependency management in plugindevelopment
- What is nonce and how to use it with Ajax in WordPress? [duplicate]
- Update exisiting site to 3.5 release candidate
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- Build path for a custom portfolio plugin
- add_filter and remove_filter added before and after wp_query
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- How to get shortcode to work inside a foreach loop called within a shortcode?
- How can I hook into existing WordPress Bulk actions?
- Scheduled event does not run at midnight
- How to bundle a plugin with a theme, or vice versa
- WordPress Media mime type filter problem 4.0
- creating elements/innerblocks via rangecontrol
- How to check if current static page is frontpage from admin plugin
- Woocommerce add custom button to backend order table
- Converting theme widgets to plugins?
- Earliest WP Hook to Safely and Reliably Redirect
- What is rich_editing?
- How Can I setup WP CLI on Windows development machine running AMPPS?
- Use theme constants in plugin?
- How can I display an error message after post has been saved?
- What method to use to call a REST API?
- Is it possible to delay execution of shortcode output callback?
- GET parameters interfere with my plugin settings
- What’s the best place to hire a freelance (contract) WordPress developer? [closed]
- Why my database table not created on activation?
- wp_enqueue_script + wp_enqueue_style Since When
- Resizing Images for a Gallery-Plugin?
- Which themes do you use to test compatibilities with your plugin [closed]
- How to debug a unit test for a WordPress plugin, which uses wordpress-test?
- Is there any way to allow a plugin to write over a previous version?
- How do i validate data entered in a meta box so that only floats can be entered in a field?
- Adding functions to hooks from within a class
- Modify users.php page to create page/post on button clicked
- What filters to call to modify the output of the entire page?
- get_current_screen() return null
- Tried in different ways but sidebar not working?
- How to Create a Simple Related Posts Plugin
- How to run a function on plugin’s options page?
- What stylesheets are available in core?
- Help With Rewrite_Rules For a Custom Plug-In
- Theme Install using a Custom Repository
- How to add plugin version update option in plugin row action?
- Activate User in Code (BuddyPress+bbpress)
- wp_filesystem put_contents issue with owner/group
- error ‘The package could not be installed. No valid plugins were found.’
- Search: how to extend the existing search to include a custom table
- Plugin development: delete options when updating to a new version
- Custom code for WordPress dynamic menu
- Gutenberg table block with Bootstrap .table class
- Translate MCE button text/tooltip in custom plugin
- Can’t change the style of a submit input type? [closed]
- How to get all queries’s results after they have executed?
- Show dynamic list of products from custom api of another database under same host
- Hide custom post type by user roles
- 400 Bad Request, in wordpress theme development, wp_ajax
- How to allow only two (or more) users access to a plugin
- Return Value of load_plugin_textdomain
- Admin Subpages without Menu entry
- Special Formatting for WordPress Plugin Description?
- custom wp_editor does not save the content in plugin settings
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Add code to template dynamically
- How Can I Add Code To A Preexisting Function Without Editing it
- Creating posts with links from a txt file
- Change the behaviour of a button
- Login page too many redirects
- escape html in jQuery for WordPress
- Progress bar in plugin within admin
- Jquery php request is returning a weird result
- Detect if requested page is PWA on server side
- WordPress admin panel not working
- Redirection from a specific page for users logged in but not with membership
- Load script on frontend from widget plugin
- Can’t get wpColorPicker to work in a widget
- Allow user to add the php code in wp_mail()
- Plugin setting page – update_option problem
- WordPress Plugin Update Process
- Ajax functionality not being called under wordpress plugin
- Registration form Plugin… Email confirmation
- Add a description/hint field in the admin page of a plugin
- How to display posts list on my plugin page?
- Saving multiple fields as array
- Serialized Data
- Can’t add images in wordpress to my page – button isn’t clickable
- Gutenberg and custom blocks messed up pagespeed score. What did I wrong?
- Gutenberg text field validation
- I don’t understand how symlinks in plugin work
- Undo operation not working in Rich text [Gutenberg]
- Help interpreting @wordpress/create-block-tutorial-template usage error
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- Block Development: hamburger module throwing error in save function
- How can I chanage the user for the composer container in wp-env?
- Adding a navigation with wp_nav_menu() to a custom block in the site editor
- Why isn’t custom sidebar panel not showing up in the Gutenberg Editor?
- Ninja Forms: Front-End Forms, Post ID?