A. A 100x100 image loaded from the internet with accessibility label
B. A blank space because remote images are not supported
C. An error because accessibilityLabel is not valid on Image
D. A local image displayed with size 100x100
Solution
Step 1: Analyze the image source
The source uses a remote URL with uri, so it loads an internet image.
Step 2: Check style and accessibility
The style sets width and height to 100, and accessibilityLabel is valid for screen readers.
Final Answer:
A 100x100 image loaded from the internet with accessibility label -> Option A
Quick Check:
Remote image with size and label = B [OK]
Hint: Remote images need uri and style size to display properly [OK]
Common Mistakes:
Forgetting to set width and height style
Thinking accessibilityLabel causes error
Assuming remote images won't load
4. Identify the error in this React Native code snippet that tries to display a local image:
import React from 'react';
import { Image } from 'react-native';
export default function App() {
return (
<Image source="./assets/photo.png" style={{ width: 50, height: 50 }} />
);
}
medium
A. The style prop must be outside the Image component
B. The source prop should use require() for local images
C. The Image component cannot display local images
D. The width and height must be strings, not numbers
Solution
Step 1: Check source prop for local image
Local images must use require() inside the source prop, not a string path.
Step 2: Verify style and component usage
The style prop is correctly placed and numbers for width/height are valid in React Native.
Final Answer:
The source prop should use require() for local images -> Option B
Quick Check:
Local images need require() = A [OK]
Hint: Local images must use require() inside source prop [OK]
Common Mistakes:
Passing string path directly to source
Misplacing style prop
Using strings for width/height instead of numbers
5. You want to display a local image and a remote image side by side in React Native. Which code snippet correctly implements this with accessibility labels and proper sizing?
hard
A.
B.
C.
D.
Solution
Step 1: Verify local and remote image sources
Local images must use require(), remote images use source={{ uri: URL }}.
Step 2: Check layout and accessibility
Using flexDirection: 'row' places images side by side, and accessibilityLabel is correctly added.
Final Answer:
Code snippet with require() for local, uri for remote, row layout, and labels -> Option A
Quick Check:
Local require + remote uri + row layout = A [OK]
Hint: Use require() for local, uri for remote, flexDirection row for side by side [OK]
Common Mistakes:
Using string path instead of require() for local images
Using uri with local file paths
Missing accessibility labels
Incorrect flexDirection for horizontal layout
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.