0

I hope you're well, just wondering if anyone has successfully set up the filepond image size metadata plugin.

https://github.com/yoldar/filepond-plugin-image-size-metadata

The documentation, is somewhat lacking, currently I have set allowImageSizeMetadata as a parameter of the FilePond component:

<FilePond
name={file}
files={file}
allowMultiple={false}
allowImageSizeMetadata={true}
server={null}                
instantUpload={false}
onupdatefiles={(fileItems) => onFileChange(fileItems)}
/>

I have imported at the top of the file as so:

import { FilePond, registerPlugin } from 'react-filepond';

import 'filepond/dist/filepond.min.css';

import FilePondPluginImageSizeMetaData from 'filepond-plugin-image-size-metadata';
import FilePondPluginImageExifOrientation from 'filepond-plugin-image-exif-orientation';
import FilePondPluginImagePreview from 'filepond-plugin-image-preview';
import 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css';

But when i log out the output in the console i'm not seeing anything extra, which I assume I should be like the width and height metadata.

Can anyone see something I might be missing?

Thanks

1 Answers1

0

I think you need to register it.

See for example the code snippet in the image preview plugin docs.

import * as FilePond from 'filepond';
import FilePondPluginImagePreview from 'filepond-plugin-image-preview';
import 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css';

// Register the plugin <- this call
FilePond.registerPlugin(FilePondPluginImagePreview);
Rik
  • 3,328
  • 1
  • 20
  • 23
  • All the plugins i'm using are registered, sorry missed that line off when posting question, so its not that. – old_blueyes Dec 04 '19 at 07:23
  • Hmm, I don't know then, this is a third-party plugin, it seems to make use of the image orientation info, so make sure you register the image orientation plugin first. Maybe that makes a difference. – Rik Dec 04 '19 at 09:00
  • @old_blueyes The plugin is working, I am logging the metadata in process function of server object https://pqina.nl/filepond/docs/api/server/#process-1 – Himanshu Patil Sep 29 '21 at 15:23