1

How to add image in controller success message right now its showing only message i want to add image with success message in controller

 echo "<p><img width='100' height='100' alt='miley fac' src='image path is here'></p>";
    $this->_getSession()->addSuccess(
        $this->__('Your Success message')
    ) ;
1
  • what is your src, kindly paste here. I think the issues is in your image src. Commented May 26, 2015 at 5:34

1 Answer 1

0

You can do simply by just adding <img> tag

$k='<img src="https://www.gravatar.com/avatar/b5e4c140f6c85eba651991235799ce61?s=32&d=identicon&r=PG&f=1" />';


 $this->_getSession()->addSuccess($this->__($k));
5
  • Hi keyur , Its showing empty message window
    – Magento AJ
    Commented May 26, 2015 at 5:29
  • img is exist or not ? in my sytem its working fine @MagentoAJ
    – Keyur Shah
    Commented May 26, 2015 at 5:31
  • yes image is exist if i copy that url in browser its showing image
    – Magento AJ
    Commented May 26, 2015 at 5:33
  • just use my code and try and not change img src @MagentoAJ
    – Keyur Shah
    Commented May 26, 2015 at 5:40
  • well glad to hear that @MagentoAJ
    – Keyur Shah
    Commented May 26, 2015 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.