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

Photos sizes #10

Open
kernel52 opened this issue May 24, 2018 · 1 comment
Open

Photos sizes #10

kernel52 opened this issue May 24, 2018 · 1 comment

Comments

@kernel52
Copy link

kernel52 commented May 24, 2018

Hi Norris,

Another small question on your very interesting plugin.

I have created my own template, with a set of attached sizes
public $attached_sizes = [ 'thumb' => 'thumbnail_grid', 'full' => 'full', ];

I have specified that the thumbnail should be 200x200 with cropping (in wordpress) and still one image renders the thumbnail in a 200x120 (WxH) format.
I suspect that this has something to do with Gallery_Data_Renderer.php

public function prepare_data() {
		$data = array(
			'type'  => $this->attachment->type,
			'ratio' => $this->attachment->get_ratio(),
		);

where the get_ratio affects the layout. (I haven't figured out how though)

The question is: Can I force the layout to be exactly 200x200 for all the images under one gallery?

Thanks,
Nikolas

@kernel52
Copy link
Author

or at least, can I override the function somehow to be able to "force" the ratio to be 1? or to be able to call the function for a specific type of image size (other than full)?

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

No branches or pull requests

1 participant