private void findAndSaveImages(LayoutDatabase layout) {
    if (isTypeWithContent(layout.getType()) && !layout.getContentEn().isEmpty()) {
      findAndSaveImagesFromContent(layout.getContentEn());
    }

    if (isTypeWithContent(layout.getType()) && !layout.getContentPl().isEmpty()) {
      findAndSaveImagesFromContent(layout.getContentPl());
    }

    if (isTypeWithContent(layout.getType()) && !layout.getAdditionalEn().isEmpty()) {
      findAndSaveImagesFromContent(layout.getAdditionalEn());
    }

    if (isTypeWithContent(layout.getType()) && !layout.getAdditionalPl().isEmpty()) {
      findAndSaveImagesFromContent(layout.getAdditionalPl());
    }
  }
  private void findAndRemoveImages(int layoutId) {
    DatabaseAdapter databaseAdapter = new DatabaseAdapter(this.fragment.getActivity());

    LayoutDatabase layout = databaseAdapter.getLayoutDatabase(layoutId);

    if (isTypeWithContent(layout.getType()) && !layout.getContentEn().isEmpty()) {
      findAndRemoveImagesFromContent(layout.getContentEn());
    }

    if (isTypeWithContent(layout.getType()) && !layout.getContentPl().isEmpty()) {
      findAndRemoveImagesFromContent(layout.getContentPl());
    }

    if (isTypeWithContent(layout.getType()) && !layout.getAdditionalEn().isEmpty()) {
      findAndRemoveImagesFromContent(layout.getAdditionalEn());
    }

    if (isTypeWithContent(layout.getType()) && !layout.getAdditionalPl().isEmpty()) {
      findAndRemoveImagesFromContent(layout.getAdditionalPl());
    }
  }