You asked

Panasonic lumix g 42 5mm f 1 7 vs yongnuo yn42 5mm f 1 7m ii?

Both lenses are 42mm f/1.7 primes for Micro Four Thirds. On that sensor they frame like an 85mm lens on full frame, and f/1.7 gives about the depth of field of f/3.4. They fit the same camera bodies, so the choice comes down to stabilisation and price.

The Panasonic Lumix G 42.5mm f/1.7 is stabilised. That steadies the camera, so it helps when you shoot handheld in dim light at slow shutter speeds. It won't freeze a moving subject, and the f/1.7 aperture does that job equally well on both lenses. If you often shoot still subjects in low light, the stabilisation is the main thing this lens gives you over the alternative.

The Yongnuo YN42.5mm f/1.7M II has the same focal length, aperture and autofocus but no stabilisation. Its page describes it as a cheap autofocus portrait prime. For portraits in good light, where you can keep shutter speeds high, you lose little. Its price is the main reason to choose it. This guide doesn't have a current price check for either lens here, so compare the shops' prices yourself, since they change.

Either lens suits a body like the OM System OM-5, which is in the fit list for both. For how this focal length works on your sensor, the sensor sizes page explains the crop factor, and the portraits guide shows where a 42mm-equivalent 85mm lens fits in a portrait kit.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.