Jump to content

Image meta description corrupted


tonicastillo
 Share

Recommended Posts

Hi. Can I ask why this happens?

When I upload a jpg, the meta keywords and description of the file loses the accents and spanish symbols of the words.

Original image on the left, and the image generated by PW on resize on the right.

Imagen_4_7_19_13_03_pegada.thumb.jpg.bf0115c323d47064b12340f0589c37f1.jpg

This happens on resize. The uploaded file is ok.

How can I control which meta keep in the photo?

Thanks a lot (and sorry for my English)...

Link to comment
Share on other sites

@tonicastillo Many thanks for sending me your images.

I have tested with the original image on windows and on linux. My variations always had correct and 100% identical iptc metadata as the original has. (see my screenshot via PM).
It seems you have to control which part within your workflow chain is not properly set to UTF-8.

If you are using PW >= 3.0.132, you can use the following code to get direct debug output from images and variations:

    $image = $page->images->first();            // get the original image, (adapt to your needs!)

    //echo $image->getDebugInfo();              // THIS MUST BE OMMITTED, BECAUSE I FOUND SOME SORT OF "STATIC" BUG WITH THE NEW DEBUG-METHOD

	$options = ['forceNew' => true];
    $variation = $image->width(300, $options);  // create / recreate a (new) variation
    echo $variation->getDebugInfo($options);    // debug output

Parts you need to check can be the OS default charset and/or codepage, PWs php files, the Webserver DefaultCharset, etc.

In the modules directory you can find a useful set of inspection tools: https://modules.processwire.com/modules/process-diagnostics/ that assists in some parts.
It has diagnostics for PHP, Webserver, Filesystem, etc.

 

--------------------

PS: Normally it should be possible to query debugInfo for multiple images one after each other, but an optimization error has crept in

Edited by horst
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...