After some more tests, the best way to avoid mimetypes errors is to not touch the mimetype at all...
So here is the updated script :
Code:
epub="$(realpath "$joinedfilename.epub")"
tmp_epub=$(mktemp -d)
unzip "$epub" -d $tmp_epub
pushd $tmp_epub
CONTENT='\t\t<meta name="fixed-layout" content="true"/>\n\t\t<meta name="original-resolution" content="584x754"/>'
sed -i '/<\/metadata>/i\'"$CONTENT" content.opf
zip -r "$epub" * -x mimetype
pushd
rm -rf $tmp_epub
Cheers !