Giter VIP home page Giter VIP logo

Comments (11)

rheaplex avatar rheaplex commented on July 23, 2024

in wp-admin/includes/image.php :

wp_read_image_metadata()

calls:

wp_kses_post_deep()

which strips tags.

So we have to use the php exif parsing. I'll look at hooking this in for the Media editor, pulling the values for the fields if they are not otherwise populated.

@mattl does this indicate a more general problem with the Exif tag format we are proposing? I don't believe so, but worth considering. Also maybe we should consider adding source and CC+ if we haven't already.

from wp-plugin-creativecommons.

rheaplex avatar rheaplex commented on July 23, 2024

Making progress with the php Exif parsing, just trying to make it efficient for the code and logical for the user.

from wp-plugin-creativecommons.

rheaplex avatar rheaplex commented on July 23, 2024

Code now extracts license and attribution url when you view the media. Looking to see if I can hook this in to the image upload process, but if not this will be Good Enough, I think.

from wp-plugin-creativecommons.

rheaplex avatar rheaplex commented on July 23, 2024

Metadata now extracted on image upload.

This won't get metadata for existing images if the plugin is installed and we have (e.g.) 20,000 images with Exif already in the system.

@mattl we can run the extract code when you view the image in the Media editor, or is this something we might want to give the user the option of running manually from the settings for the plugin (a button [Scan Existing Images for License Metadata And Apply It] ) if that's possible?

from wp-plugin-creativecommons.

mattl avatar mattl commented on July 23, 2024

Won't existing images have been previously stripped by WordPress?

from wp-plugin-creativecommons.

rheaplex avatar rheaplex commented on July 23, 2024

I don't believe so. The strings are stripped after reading from the file, rather than the file itself being sanitised.

from wp-plugin-creativecommons.

mattl avatar mattl commented on July 23, 2024

screenshot from 2016-07-29 15-56-15

Maybe something like this? We could pull all the existing images from the CC website as a test, but also @ericsteuer has good insight into how this works on a big site liked Wired.com who probably have a few hundred thousand images.

from wp-plugin-creativecommons.

rheaplex avatar rheaplex commented on July 23, 2024

I had in mind more a global "Extract CC License metadata where present but
don't overwrite anything" option.

We could also add a button to the media manager to do this for individual
images.

So the former would support hundreds of thousands, the latter just a few if
you only want to use a few.

On Fri, Jul 29, 2016 at 1:57 PM, Matt Lee [email protected] wrote:

[image: screenshot from 2016-07-29 15-56-15]
https://cloud.githubusercontent.com/assets/33296/17263143/0538b4a8-55a5-11e6-9471-e62fa5f2e11b.png

Maybe something like this? We could pull all the existing images from the
CC website as a test, but also @ericsteuer https://github.com/ericsteuer
has good insight into how this works on a big site liked Wired.com who
probably have a few hundred thousand images.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABU8ocliyFl3zU0pVeCqom5cyrKPavHks5qamkxgaJpZM4JWuJI
.

from wp-plugin-creativecommons.

mattl avatar mattl commented on July 23, 2024

The worry I have there is that we'd wind up adding extra captions to existing images all over the place.

from wp-plugin-creativecommons.

rheaplex avatar rheaplex commented on July 23, 2024

Sure. It's the sort of thing where the user will want the plugin to do the right thing, for a value of "the right thing" that will differ from case to case. And they'll really want an Undo button.

So if this is too difficult to do usefully we shouldn't make something that will just frustrate people. :-)

from wp-plugin-creativecommons.

BjornW avatar BjornW commented on July 23, 2024

Why not use the 'regenerate thumbnails approach' in which you have a plugin run once for all existing images? This could be a seperate add-on plugin which can be removed after it has run, since it's likely to be run only once.

from wp-plugin-creativecommons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.