Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Metronic Image Input Exclusive Plugin - trying to implement - need assistance


Hello. I'm trying to implement the Image Input plugin. I can assign an image and using some javascript / php (backend) can get the image stored on the server and mapped in a db.

My hurdle is when I load the profile in the update mode. I am able to code the location of the image and assign it to the 'src' attribute of an image element.

But my problem is - the initial display of the image does not include the 'Remove' button. What happens if someone just wants to remove the image they assigned to their avatar and not assign a new one?

I need for the page load to recognize an image is being assigned at the outset and to provide the 'remove' icon.

In other words, I need to be able to toggle that image on / off based on the existence of the user's profile picture.

Thanks.
Michael


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Can you pls give the solution here. I am also facing the same issue



I answered my own question...I found this section of code in the documentation:

I can dynamically populate this <div> and the controls appear as I want them to.

<!--begin::Image preview wrapper-->
<div class="image-input-wrapper w-125px h-125px" ></div>
<!--end::Image preview wrapper-->



Yes, each core component has API to dynamically control the initialization according to your app logic. If you need any further help please let us know.


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(