First, you need and install PGLobEditor.
PGLobEditor is a database tool that can batch import/export PostgreSQL BYTEA (BLOB) data.
Using PGLobEditor you can batch export PostgreSQL query results BYTEA (BLOB) data to files easily and fast.
More about PGLobEditor – the tool to batch import/export PostgreSQL BYTEA (BLOB) data