Show the collection image uploaded by the metafield instead of the standard collection image

Hey guys i’m using the Ella Theme and I want to add a dynamic collection image through a metafield to my collection header, so far so good… i linked the image to the metafield collection_image_header which i created,… this works. but somehow if i add a collection image through the basic collection image upload it seems to overwrite the metafield and showing the basic collection image instead of the metafield image which i linked correctly. maybe its a matter of which image gets prioritize in the liquid? i dont know but could you please help me. this overwriting happens only on the “upload image” but not on the “upload image for mobile” everything seems to be fine with mobile metafield…

examplepage: https://roundplates.de/collections/aachen

best marvin

i found something, i guess this is how its getting prioritize? can someone pls help me what to write instead here?

or maybe here?

Yep, lines 29-33 basically say: if there is a collection image, use that one, otherwise use one from block settings.

That’s a kind of backwards logic – collection image should be default, but if you specify one in settings it should take over.

I’d try to replace lines 29-33 with this:

assign image = block.settings.image | default: collection.image

thx tim!!!