Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Use LastModified date when no exif data are found #1729

Closed
2 tasks done
ildyria opened this issue Jan 23, 2023 · 5 comments
Closed
2 tasks done

[Enhancement] Use LastModified date when no exif data are found #1729

ildyria opened this issue Jan 23, 2023 · 5 comments
Labels
Project for volunteers The team has no plans to work on it (e.g. lack of time) but an external contribution is accepted

Comments

@ildyria
Copy link
Member

ildyria commented Jan 23, 2023

Original issue: #1727

See here

When uploading a file, we have access to extra meta-data. We can use those to fill up dates when provided.

  • : Fetch data and replace when no Exif data are provided
  • : Add config option to enable / disable this functionality.
@ildyria ildyria added the Project for volunteers The team has no plans to work on it (e.g. lack of time) but an external contribution is accepted label Jan 23, 2023
@wladif
Copy link
Contributor

wladif commented Feb 27, 2023

@ildyria I have some free time this days and I could try to implement this. Is it ok with you?

@ildyria
Copy link
Member Author

ildyria commented Feb 27, 2023

Go for it ! :)
It is written as "project for voluneers" so pretty much up for grab ! :)

@wladif
Copy link
Contributor

wladif commented Apr 4, 2023

@ildyria With the current php-exif lib I'm having a hard time figuring out if an images has Exif data or not. As far as I can tell, when Imagemagick is used, the library will always return some an Exif instance, even if the image doesn't have exif. I find this to be a bit confusing. Is this something intended or is there a plan to refactor it? How can I check if a file has actual exif data or not ? Thanks

@ildyria
Copy link
Member Author

ildyria commented Apr 5, 2023

Thanks for pointing that one out. I fixed the return type of the reader: LycheeOrg/php-exif#62 to reflect this behavior.

Yes this behavior is working as expected. Exif data is also size etc...
What matters in your case is whether some of the data in the Exif object are there or not.
See here https://github.com/LycheeOrg/php-exif/blob/master/lib/PHPExif/Exif.php

@wladif
Copy link
Contributor

wladif commented May 8, 2023

@ildyria There is already a config for this functionality. The config was included in #1821, it's called: use_last_modified_date_when_no_exif_date.

@ildyria ildyria closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project for volunteers The team has no plans to work on it (e.g. lack of time) but an external contribution is accepted
Projects
None yet
Development

No branches or pull requests

2 participants