Insert an image in postgresql database

If the column type is bytea then you can simply use the ‘pg_read_binary_file‘.

Example: pg_read_binary_file('/path-to-image/')

check postgresql documentation of pg_read_binary_file

Leave a Comment