-1

I am moving Wordpress site from one domain to another. In the old domain the WP version was 3.5.2 while in the new domain WP version is 3.8.1.

There is a page named "2002" which just contains an image gallery. The text code is something like this:

[gallery columns="6" ids="318,319,320,321,322"]

In the old website it looks like this:

Thumbnail grid view in the old website

while in the new website it looks like this:

Thumbnail grid view in the new website

I have set Thumbnail size width and height to 150 and checked Crop thumbnail to exact dimensions (normally thumbnails are proportional) in Settings -> Media Settings. I have also regenerated thumbnails via it's plugin after it. But still it shows the same.

Am I missing something in the new website?


Update:

Let's don't consider that I have moved the site. What I did is: I created a new page. Added an image gallery. Set the maximum width and height. Regenerated images. But it doesn't crop images as you can see in the second image. FYI: I have installed Jetpack app (if it may cause this issue)

  • PS: I am new to Wordpress and WP.SE. If this is not an on-topic question then please let me know. – hims056 Feb 19 '14 at 12:33
  • How did you move the site? – s_ha_dum Feb 19 '14 at 14:16
  • @s_ha_dum - Actually, I do not know about how can I move so in the new website, I created a new Wordpress setup, And manually created each page. – hims056 Feb 19 '14 at 14:18
  • @s_ha_dum - Is there any easy and faster way to move the site? Also my old site's WP version is 3.5.2 can/should I downgrade from 3.8.1 to 3.5.2 to keep all settings as it is? – hims056 Feb 19 '14 at 14:25
  • No. You really can't "downgrade", and you don't want to be running 3.5.2. It is too old. As far as what it wrong, I can't tell. Sorry. – s_ha_dum Feb 19 '14 at 14:35
0

Consider exporting your content out of the old WP version and into the new one with the built in WP tools (under 'Tools' in the admin dashboard. Make sure you have the export images box checked. This doesn't always work for me. You could also export the images from your old site gallery and import them into the new.

  • Hi please see my updated question. – hims056 Feb 20 '14 at 5:30
0

One thing to consider is that the images might be smaller the crop dimensions. If this is true, WordPress will not crop the image, but will instead leave it, resulting in the images being as they are.

Try placing this function in your functions.php file or a custom plugin:

function wpdev_thumbnail_crop_fix($default, $orig_w, $orig_h, $new_w, $new_h, $crop) {
  if(!crop) return null; // Let the WordPress default function handle this.

  $aspect_ratio = $orig_w / $orig_h;
  $size_ratio = max($new_w / $orig_w, $new_h / $orig_h);

  $crop_w = round($new_w / $size_ratio);
  $crop_h = round($new_h / $size_ratio);

  $s_x = floor(($orig_w - $crop_w) / 2);
  $s_y = floor(($orig_h - $crop_h) / 2);

  return array(0, 0, (int) $s_x, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h);
}
add_filter('image_resize_dimensions', 'wpdev_thumbnail_crop_fix', 10, 6);

Then run regenerate thumbnails and see what happens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.