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

Rotate some Flickr images before sideloading them #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChrisHardie
Copy link

I think this fixes #20 by retrieving the Flickr "rotation" property for photos being imported and, if rotation is needed, fixes the image before sideloading it.

This introduces a 6th parameter to the sideload_media function - a $local_files array that is meant to complement the original $urls array. If there is a local file value set for a given URL, the function will now use that as the source for the sideload, keeping everything else the same. This should give other importers the flexibility to perform media transformations prior to import, without the performance hit of post-import changes and related thumbnail regeneration.

I've tested this locally with a variety of images, but haven't yet run my full Flickr library through it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flickr: photo orientation and rotation
1 participant