Skip to content

ParallaxImage does not load image #1044

Description

@fdelavra

Hello.

After updating react native and libraries to last version, the carousel doesn't show any image

My code:

`const renderItem = ({item, index}, parallaxProps) => {

    const even = false;

    return (
        <TouchableOpacity
            activeOpacity={0.5}
            style={sliderStyles.slideInnerContainer}
            onPress={() => {
                snapTo(index);
                console.log(item)
                dispatch(getCategory(item.id));
            }}
        >
            <View style={sliderStyles.shadow} />
            <View style={[sliderStyles.imageContainer, even ? sliderStyles.imageContainerEven : {}]}>
                <ParallaxImage
                    source={{uri: 'https://i.goopics.net/whg4hg.jpg'}}
                    containerStyle={[sliderStyles.imageContainer, even ? sliderStyles.imageContainerEven : {}]}
                    style={sliderStyles.image}
                    parallaxFactor={0.35}
                    showSpinner={true}
                    spinnerColor={even ? 'rgba(255, 255, 255, 0.4)' : 'rgba(0, 0, 0, 0.25)'}
                    onLoad={onLoadEnd}
                    {...parallaxProps}
                />
                <View style={[sliderStyles.radiusMask, even ? sliderStyles.radiusMaskEven : {}]} />
            </View>
            <View style={[sliderStyles.textContainer, even ? sliderStyles.textContainerEven : {}]}>
                <Text style={{fontSize: wp('1.4%'), fontStyle: "italic"}}>{item.name}</Text>
            </View>
        </TouchableOpacity>
    );
}

return (
    <RNCarousel
        ref={carouselRef}
        data={_.orderBy(categoryCarousel, 'name', 'asc')}
        renderItem={renderItem}
        sliderWidth={sliderWidth}
        itemWidth={itemWidth}
        inactiveSlideScale={0.7}
        inactiveSlideOpacity={0.7}
        containerCustomStyle={styles.slider}
        contentContainerCustomStyle={styles.sliderContentContainer}
        loop={true}
        loopClonesPerSide={8}
        autoplay={true}
        autoplayDelay={3000}
        autoplayInterval={3000}
        lockScrollWhileSnapping = {true}
        hasParallaxImages={true}
    />
);`

the render:

Image

Activity

  1. changed the title [-]Image not loaded[/-] [+]remote Image not loaded[/+] on Mar 6, 2025
  2. changed the title [-]remote Image not loaded[/-] [+]ParallaxImage does not load image[/+] on Mar 6, 2025
  3. fdelavra commented on Mar 6, 2025

    @fdelavra
    Author

    For information, I have tested to change ParallaxImage by react native Image and everything works great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions