Hi Zac,
I am trying to get an image file (as a resource) into my block.
Here is the code i currently have which as you can see has a hard coded link to the file:
edit: function( props ) {
// Creates a <p class='wp-block-cgb-block-cp-current-rms-plugin'></p>.
return (
<div className={ props.className }>
<img className="currentlogo" src="../wp-content/plugins/Current-RMS-for-Wordpress-Gutenberg/dist/current-rms-logo.png"></img>
</div>
);
},
Is it possible to use something like plugin_dir_path? If so how would i do it?
Regards
CHRIS