Pages (3): 1 2 3   
Member
Member
blueboat   01-02-2013, 10:55
#1

Hi folks,

What is the best URL to view ZP images from another website (eg. wordpress) so that the height and width (etc.) can be set in url parameters? This is surely documented somewhere, but I can't find it.

I have been using zenphotopress to embed images into wordpress for 6 years no problems at all. Since 1.4.4 (or 1.4.X), the image URLs are broken and need to be updated.

Here's an example of what doesn't work anymore:
http://www.exploringbliss.com/photography/zp-core/i.php?a=canada&i=20090826-Canada-2701.jpg&w=590&h=

thanks for any suggestions you might have.

Cheers,
Fraser

Administrator
Administrator
acrylian   01-02-2013, 11:07
#2

That actually never worked. Remove the "w" and "h" part and replace it by "s".
http://www.zenphoto.org/documentation/core/_i.php.html

Member
Member
sbillard   01-02-2013, 18:14
#3

This is not going to work because of a security hole we closed. You will have to reference the cached version of the image or look to see what Zenphoto generates for the image processor reference--there is a security parameter added that is not easily guessable.

Member
Member
blueboat   02-02-2013, 14:27
#4

thanks guys.

Below is what I ended up doing since we can't do this via url params anymore. Of course it would be easier if I just used the same size images in blog posts and in the gallery....

  1. temporarily change the size of ZP images in my theme's options to match the size i need wordpress (590)

  2. cache all images and change image size back to zenphoto size (795)

  3. change broken img src's in wordpress to newly cached images:

  • phpadmin: backup wordpress database table xx_posts, then search and export post_type "post" and export these rows to a file
  • in a text editor use find and replace to change the urls as needed in the exported sql file (for me it took 3 passes to get them completely)
  • delete the same rows just exported for the table xx_posts.
  • import the modified sql file (and test) into table xx_posts.
  1. Try to remember NOT to purge image cache!

This works fine, but I will have to remember to do 1 & 2 everytime I want to display an images in wordpress that hasn't already been cached.

Member
Member
sbillard   02-02-2013, 19:57
#5

You do not have to change the theme image size to cache an arbitrary sized image. You can just set up such a size in the options for the cacheManager and select that when you cache the images.

Sorry about the inconvenience--but the alternative is that someone could flood your site with image resizing requests in a severe denial of service attack by issuing arbitrary image processor links.

Member
Member
blueboat   13-02-2013, 11:25
#6

no worries, thanks for the cache manager tip. i reckon closing that security hole it a good thing, even though that means plugins like zenphotopress can't work anymore. oh well, it was a good run...

Member
Member
sbillard   13-02-2013, 20:24
#7

We have made a small modification of the security guard. Now if the image that the i.php link references has already been cached the image will be fetched. Otherwise the security guard kicks in. So all you have to do for the plugin to continue to work is to be sure you have cached the images.

Member
Member
hkdigit   01-03-2013, 11:11
#8

sbillard, which version of zenphoto have the "small modification"?

Administrator
Administrator
acrylian   01-03-2013, 11:49
#9

That would be the support build or the soon coming 1.4.4.2 release.

Member
Member
hkdigit   01-03-2013, 14:44
#10

Thanks! Waiting for to get new version soon.

Besides, hope i.php can continue support &s=thumb parameter as well.

For exmaple:

http://www.hkceleb.com/pic/zp-core/i.php?a=kate-tsui-tsz-shan&i=kate-tsui-20110504-131612.jpg&s=thumb

Many thanks in advance.

Chris

Administrator
Administrator
acrylian   01-03-2013, 14:48
#11

I think it will support all parameters but only if the image has been cached already. (as mentioned above).

Member
Member
hkdigit   05-03-2013, 07:29
#12

Dear acrylian,

Does 1.4.4.3 version got the new feature? If yes, it seems does not work.

Many thanks in advance.

Chris

Administrator
Administrator
acrylian   05-03-2013, 10:31
#13

The images must have been cached already. I am not sure actually, if it is in the 1.4.4.x stream. Might be in 1.4.5 only.

Member
Member
hkdigit   15-04-2013, 01:39
#14

acrylian,

I just upgrade to 1.4.4.4, seems it does not "fix" the issue... Any hints when 1.4.5 will release... i am feature this feature for long long time...

many thanks in advance.

Member
Member
sbillard   15-04-2013, 02:47
#15

1.4.5 will release in June, but it mostly complete now. You can give it a try by downloading the branch from GitHub. There is a link on the Zenphoto.org webpage over on the right hand side.

Administrator
Administrator
acrylian   15-04-2013, 12:58
#16

There still are a few things for 1.4.5 on the list and I moved some of my tickets to 2.0 (meaning 1.4.6 actually) as I fear I won't manage it for 1.4.5.

Member
Member
sbillard   15-04-2013, 16:48
#17

Just so we are all on the same page, with the current builds of the 1.4.4 release there is an option for Image Processor Security. When this is set there is a token added to the i.php URI that must be valid when the image is processed. This will not change.

If the option is set and an external site issues a fetch on an i.php image link that does not have this token and if the image is not already cashed the image will not be delivered.

So your choices are:

  1. Cache the images you want to display externally
  2. Provide the proper uri with the token attached to the external site
  3. Turn off the option (but note that this is a security issue....)
Member
Member
hkdigit   17-04-2013, 02:13
#18

Hi sbillard,

  1. Cache the images you want to display externally

How to I generate cache image for i.php using s=thumb parameter?

For example:

http://www.hkceleb.com/pic/zp-core/i.php?a=kate-tsui-tsz-shan&i=kate-tsui-20110504-131612.jpg&s=thumb

Administrator
Administrator
acrylian   17-04-2013, 08:19
#19

If you call that url the image will be cached if it isn't already. If you need specific sizes in bulk you need to use the cache manager.

Member
Member
hkdigit   17-04-2013, 12:58
#20

Please advise if following steps are correct

  1. On Option / Image page
    unchecked "Secure image processor" checkbox

  2. On Overview Page
    Click "Cache" button to generate all cache image

On cache folder, I find the following cache image:

kate-tsui-20110504-131612_128_thumb.jpg
kate-tsui-20110504-131612_240_thumb.jpg
kate-tsui-20110504-131612_40_cw40_ch40_thumb.jpg
kate-tsui-20110504-131612_85_cw85_ch85_thumb.jpg
kate-tsui-20110504-131612_85_thumb.jpg
kate-tsui-20110504-131612_w128_h128_cw128_ch128_thumb.jpg
kate-tsui-20110504-131612_w75_h75_cw75_ch75_thumb.jpg

If I use the following link, the browser only return blank page:

http://www.hkceleb.com/pic/zp-core/i.php?a=kate-tsui-tsz-shan&i=kate-tsui-20110504-131612.jpg&s=thumb

Any hints?

** The above URL was generated by zenphotopress... and I have lot of Wordpress Post using it to display album thumbnail.

Pages (3): 1 2 3   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.