A. You must use 'wp_enqueue_scripts' instead of this filter.
B. The filter name is incorrect and never runs.
C. The code changes metadata but does not regenerate thumbnails.
D. Thumbnails cannot be resized in WordPress.
Solution
Step 1: Understand what the code does
The code changes metadata but does not recreate image files.
Step 2: Identify missing step
Thumbnails must be regenerated to apply new sizes; metadata alone is not enough.
Final Answer:
The code changes metadata but does not regenerate thumbnails. -> Option C
Quick Check:
Metadata change ≠ thumbnail regeneration [OK]
Hint: Changing metadata needs regeneration to update images [OK]
Common Mistakes:
Assuming filter runs incorrectly
Confusing script enqueue with image filters
Believing thumbnails cannot be resized
5. You want to serve WebP images in WordPress for better performance but keep JPEG fallback. Which approach is best?
hard
A. Convert images to PNG format for better compression.
B. Rename all JPEG files to .webp manually and upload them.
C. Disable JPEG uploads and only allow WebP images.
D. Use a plugin that generates WebP versions and serves them with fallback support.
Solution
Step 1: Understand WebP and fallback needs
WebP is modern and efficient but not supported by all browsers, so fallback is needed.
Step 2: Evaluate options
Only Use a plugin that generates WebP versions and serves them with fallback support. uses a plugin to generate WebP and fallback automatically, which is best practice.
Final Answer:
Use a plugin that generates WebP versions and serves them with fallback support. -> Option D
Quick Check:
WebP + fallback = plugin solution [OK]
Hint: Use plugins for WebP with fallback, not manual renaming [OK]
Common Mistakes:
Manually renaming files breaks compatibility
Disabling JPEGs removes fallback
Using PNG instead of WebP for compression
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.