<commit_before>class PageImageSerializer < ActiveModel::Serializer
  attributes :id, :image_id, :primary, :filename, :caption, :created_at

  def name
    object.image.name
  end

  def caption
    object.image.caption
  end

  def filename
    object.image.filename
  end

  def size
    object.image.crop_size
  end

  def created_at
    object.image.created_at
  end
end<commit_msg>Include URL in PageImageSerializer<commit_after>class PageImageSerializer < ActiveModel::Serializer
  include DynamicImage::Helper
  attributes :id, :image_id, :primary, :filename, :caption, :created_at, :url

  def name
    object.image.name
  end

  def caption
    object.image.caption
  end

  def filename
    object.image.filename
  end

  def size
    object.image.crop_size
  end

  def created_at
    object.image.created_at
  end

  def url
    dynamic_image_path(
      object.image,
      size: "2000x2000",
      crop: false,
      upscale: false
    )
  end
end
{'fraction_non_alphanumeric': 0.071875, 'fraction_numerical': 0.008333333333333333, 'mean_word_length': 3.0893617021276594, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7646213', 'n_tokens_mistral': 321, 'n_tokens_neox': 301, 'n_words': 78}