Tentando redimensionar a janela com a apresentação de slides do ciclo jquery

Estou tentando executar um script de redimensionamento de janela JavaScript em uma página com uma apresentação de slides do ciclo jQuery, mas estou encontrando alguns bugs que parecem não funcionar. Ele redimensiona bem a primeira imagem no carregamento da página, mas esquece os novos atributos de altura / largura para os slides subsequentes. Posso configurá-los novamente antes e depois de usar o jQuery, mas as imagens sempre piscam em tamanho real por um breve momento antes de redimensionar.

O jQuery.cycle está redimensionando os slides de volta ao tamanho nativo? Se sim, como faço para parar isso?

$(document).ready(function () {
  $('.slideshow').cycle({
    fx: 'fade',
    speed: 200,
    timeout: 1000,
    pause: 1,
    before: function (currSlideElement, nextSlideElement, options, forwardFlag) {
      resize();
    },
    after: function (currSlideElement, nextSlideElement, options, forwardFlag) {
      resize();
    }
  });

  $('.slideshow').find('img').css("height", "0");
  $('#image').hide().idle(1000).fadeIn();
  resize();
});

$(window).resize(function () {
  resize();
});

function resize() {

  var theheight = window.innerHeight;
  var thewidth = window.innerWidth;

  var imageheight = theheight - 200;

  if (imageheight > 540) {
    imageheight = 540;
  }
  if (imageheight < 300) {
    imageheight = 300;
  }

  var imagewidth = imageheight / 0.6585365;

  $(".slide").css("height", imageheight);
  $(".slide").css("width", imagewidth);
  $(".slide").attr("height", imageheight);
  $(".slide").attr("width", imagewidth);

}

questionAnswers(5)

yourAnswerToTheQuestion