Skip to content

Commit

Permalink
chore(deprecate): emit warning when generating srcsets
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherwin H committed Oct 25, 2019
1 parent 75b6f99 commit e2ffc2b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/imgix/rails/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def initialize(path, source: nil, tag_options: {}, url_params: {}, widths: [])
protected

def srcset(url_params: @url_params, widths: @widths)
if url_params[:w].present?
warn "Warning: srcset generation will be refactored in the next major release to provide greater flexibility and capabilities in serving responsive images. Unfortunately, these changes will require adjustments to logic that can cause unexpected behavior for users who are using this gem in its current state. Please consult this project's documentation when upgrading to better understand the expected behavior."
end
widths = widths || target_widths

srcset_url_params = url_params.clone
Expand Down

0 comments on commit e2ffc2b

Please sign in to comment.