Is the direction of the electric field relative to the magnetic field in an electromagnetic wave a convention?

If you were to flip the direction of the magnetic field in the above picture, it would describe light propagating in the opposite direction—so no, in this way, its direction is not a convention.

However, it's important to keep in mind that the direction of the magnetic field is a convention at a more fundamental level. It represents an oriented plane perpendicular to its direction via an orientation rule. If we all decided to use the "left hand rule" instead of the right hand rule for the cross product, then the magnetic field would point in the opposite direction. It is a bivector, or a pseudovector, field.

The electric field is a true vector field. At least in the three-dimensional description, which is itself a (very decent) convention, as long as we acknowledge that this picture depends on our reference frame.

In the four-dimensional picture, electric and magnetic fields can be understood as a single bivector field, such that a choice of reference frame determines a splitting of this bivector into independent "timelike" (electric) and "spacelike" (magnetic) planes.

That may be more than you were originally looking for, but I think this question makes for a good entry point to many of the other choices of representation that we make in physics.

The direction of the fields of an electromagnetic wave is not conventional but it's determined by Maxwell's equations. For the particular case of a plane electromagnetic wave of angular frequency $\omega$ in vacuum, which can be represented by the picture you posted, Maxwell's equations require that the wave vector $\boldsymbol{k}$, the electric field $\boldsymbol{E}$ and the magnetic flux density $\boldsymbol{B}$ obey the relationships (the dot represent the scalar product and the cross the vector product)

$$\begin{align}&\boldsymbol{k}\cdot \boldsymbol{E} = 0, \\ &\boldsymbol{k}\cdot \boldsymbol{B} = 0, \\ & \boldsymbol{B}=\frac{1}{\omega}\boldsymbol{k}\times \boldsymbol{E}.\end{align}$$

This means that $\boldsymbol{k}$, $\boldsymbol{E}$ and $\boldsymbol{B}$ are three orthogonal vectors and that the direction of any one of them is determined by the other two. Therefore, no, you cannot mirror the magnetic field in the picture.

Note that if it were possible to mirror just the magnetic field, then, by superposition, you would be able to construct a wave having nonzero electric field but zero magnetic field.

The arrows are pointing in the "positive" direction of the fields. Which direction is "positive" is arbitrary (you can say that the "positive" direction in an electrical field in the direction in which the electrical potential energy for a positively charged particle is increasing, but what charge is "positive" is itself a convention). Moreover, those conventions are chosen independently. However, once those conventions are chosen, the directions of the fields for an electromagnetic wave are fixed. So if you're asking whether the conventions could have been chosen such that the magnetic field would be flipped, the answer is "yes". If you're asking whether we can flip the magnetic field, without affecting any of the other conventions in physics, the answer is "no".