Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
ReactJS Image from local resource
-
@munsterlander Yes … X MEN
-
<img class=“products-list__item-image” src="/image/cart/{{image}}/{{id}}" />
I’ll try it now:
<img class=“products-list__item-image” src=“cart/{{image}}/{{id}}” />
And a folder (cart) inside js folder
-
@Leonardo-Augusto AH! Try just one . so: ‘./image/cart/android.png’. Also, this link says that you need to do a require. Sorry, React I have never used.
https://facebook.github.io/react-native/docs/images.html
Also, it seems there is a bug too:
http://stackoverflow.com/questions/33982426/react-native-relative-image-path-loading
-
@munsterlander said:
./image/cart/android.png
Nothing here !I’m building a cart (To my web site) to users estimate the pricing to build apps!
So i have pictures of the features to add . Using an URL …ok , But how i have tried no no no
-
-
@Leonardo-Augusto So the pen works but on your site it doesn’t? I didn’t see anything not showing in the pen, it looks like its working or did I just miss it!? :smile:
-
@munsterlander Using a direct url
image: 'http://lorempixel.com/150/150/food',
Yes, it works! I guess i’ll keep the url lol
-
Lol Android app 13,20!!!
-
Welp as long as it works, I say! Sometimes you don’t have to know why, just that it worked.
-
@munsterlander Yes