ignite icon indicating copy to clipboard operation
ignite copied to clipboard

How to automatically import images files in ignite 2.0?

Open zbtang opened this issue 7 years ago • 8 comments

Ignite 1 had a command ignite import imagesfile and it would be nice to have an equivalent in Ignite 2.0.

zbtang avatar Mar 22 '17 05:03 zbtang

Hey there @zbtang ! I assume you're using the https://github.com/infinitered/ignite-ir-boilerplate-2016 boilerplate. Just drop your image files into App/Images, add it to App/Themes/Images.js, and then use it like this:

import React from 'react'
import { View, Image } from 'react-native'
import { Images, Colors } from '../Themes'
import Styles from './Styles/MyImageStyles'

export default class MyImageComponent extends React.Component {
  render () {
    return (
      { /* other components... */ }
        <Image style={Styles.yourImageStyle} source={Images.yourImageHere} />
      { /* other components... */ }
    )
  }
}

Hope this helps!

jamonholmgren avatar Mar 23 '17 05:03 jamonholmgren

Hi, thanks ! But what I really mean is how to import images automatic . Because in Ignite 1.x there is a command ignite import imagesfile to import all image files into Images.js file. Is there any command on version 2.0 to automatic import all image files? Thanks !

zbtang avatar Mar 23 '17 06:03 zbtang

Ah ... I'm not sure! Maybe @fvonhoven knows?

jamonholmgren avatar Mar 23 '17 06:03 jamonholmgren

This is a good idea, but will need to wait for a future release.

jamonholmgren avatar May 18 '17 04:05 jamonholmgren

@zbtang - this will return. Just need to rewrite it as a plugin.

GantMan avatar May 22 '17 20:05 GantMan

Excited to hear that ! Thanks for your work !

zbtang avatar May 23 '17 03:05 zbtang

this would be really appreciated

nikitph avatar Apr 25 '18 02:04 nikitph

We'd appreciate help with this feature!

jamonholmgren avatar May 03 '19 04:05 jamonholmgren